Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -6,6 +6,7 @@ from phi.agent import Agent
|
|
| 6 |
from phi.model.google import Gemini
|
| 7 |
from google.generativeai import upload_file, get_file
|
| 8 |
from dotenv import load_dotenv
|
|
|
|
| 9 |
|
| 10 |
# --- Load API Key ---
|
| 11 |
load_dotenv()
|
|
@@ -33,7 +34,8 @@ def fix_srt_format(input_file, output_file):
|
|
| 33 |
def initialize_agent():
|
| 34 |
return Agent(
|
| 35 |
name="Video AI Subtitle Generator",
|
| 36 |
-
model=Gemini(id="gemini-2.0-flash-exp"),
|
|
|
|
| 37 |
markdown=True,
|
| 38 |
)
|
| 39 |
|
|
@@ -67,7 +69,7 @@ to this tutorial
|
|
| 67 |
|
| 68 |
...
|
| 69 |
|
| 70 |
-
Only output the transcription in the above format. Do not return any additional text.
|
| 71 |
'''
|
| 72 |
|
| 73 |
# --- Gradio Interface Function ---
|
|
|
|
| 6 |
from phi.model.google import Gemini
|
| 7 |
from google.generativeai import upload_file, get_file
|
| 8 |
from dotenv import load_dotenv
|
| 9 |
+
from phi.model.groq import Groq
|
| 10 |
|
| 11 |
# --- Load API Key ---
|
| 12 |
load_dotenv()
|
|
|
|
| 34 |
def initialize_agent():
|
| 35 |
return Agent(
|
| 36 |
name="Video AI Subtitle Generator",
|
| 37 |
+
# model=Gemini(id="gemini-2.0-flash-exp"),
|
| 38 |
+
model=Groq(id="llama-3.3-70b-versatile"),
|
| 39 |
markdown=True,
|
| 40 |
)
|
| 41 |
|
|
|
|
| 69 |
|
| 70 |
...
|
| 71 |
|
| 72 |
+
Only output the transcription in the above format (like **SRT** file format). Do not return any additional text.
|
| 73 |
'''
|
| 74 |
|
| 75 |
# --- Gradio Interface Function ---
|