Update app.py
Browse files83 unmodified lines84858687888990911 unmodified line939495969798991001011021031041051061071081091101111121131141151161171183 unmodified lines12212312412512612712883 unmodified linesresult = model.transcribe(temp_path)os.remove(temp_path)text_to_process = description if description else result["text"]prompt = f"""You are an expert cooking assistant AI. You will receive the text or transcript of a recipe from a video.1 unmodified line{{"title": "Recipe title here","video_description": "Text from the original video if provided","author": "If known or mentioned","video_url": "{audio_url}","duration_minutes": 25,"kcal": 600,"difficulty": "easy","servings": 2,"ingredients": {{"elaboration_title_here": [{{"quantity": 1.5,"unit": "tsp","name": "salt","icon": "🧂"}},{{"quantity": 750,"unit": "g","name": "chicken breast","icon": "🍗"}}]}},3 unmodified lines]}}Infer all missing values if not explicitly stated, using the video text.Here is the text to analyze:83 unmodified lines84858687888990919293941 unmodified line969798991001011021031041051061071081091101111121131141151163 unmodified lines12012112212312412512612783 unmodified linesresult = model.transcribe(temp_path)os.remove(temp_path)# Texto para procesartext_to_process = description if description else result["text"]# Prompt completoprompt = f"""You are an expert cooking assistant AI. You will receive the text or transcript of a recipe from a video.1 unmodified line{{"title": "Recipe title here","video_description": "Full video transcription or description","description": "A short summary description of the recipe","author": "If known or mentioned, else null","video_url": "{audio_url}","duration_minutes": 25,"kcal": 600,"difficulty": "easy","servings": 2,"ingredients": {{"elaboration_title": [{{"quantity": 1.5,"unit": "tsp","name": "salt","icon": "🧂"}}]}},3 unmodified lines]}}If any field cannot be confidently extracted, set it to null.Infer values logically even if they are not explicitly written, based on the text.Here is the text to analyze:
app.py+9-10