Skip to content
This repository has been archived by the owner on Dec 9, 2024. It is now read-only.

Commit

Permalink
Removed duplicate docsting text that is used in the propt docstring t…
Browse files Browse the repository at this point in the history
…ext. Fixes #1.
  • Loading branch information
Rumsie-Grimshaw committed May 26, 2024
1 parent 164ce41 commit bd07c56
Showing 1 changed file with 0 additions and 7 deletions.
7 changes: 0 additions & 7 deletions app/extract_text.py
Original file line number Diff line number Diff line change
Expand Up @@ -77,13 +77,6 @@ def extract_frame_at_timestamp(filename: str, timestamp: float) -> Union[cv2.Vid
@staticmethod
def openai_format_raw_ocr(extracted_text: str, language: str) -> str:
"""
"Given an input of potentially raw OCR capture from a video containing Python code, your task is to correct
and format the code. Ensure the code's indentation and syntax are accurate. Exclude any content that isn't
valid Python code. If no recognizable Python content is detected, return 'ERROR'. Do not provide
explanations, leading or trailing backticks, or specify the language in your response. Simply return the
corrected code. Avoid making extensive alterations; the goal is to retain the original intent of the capture
as closely as possible."
prompt = f"Fix up the following {language} code snippet: '{extracted_text}'" response =
openai.ChatCompletion.create( model="gpt-3.5-turbo", messages=[ {"role": "system", "content": "Given an input
of potentially raw OCR capture from a video containing code, your task is to correct and format the code.
Expand Down

0 comments on commit bd07c56

Please sign in to comment.