Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
@@ -60,12 +60,14 @@ def generate_ai_summary(transcript):
|
|
60 |
model = google_genai.GenerativeModel('gemini-pro')
|
61 |
model_response = model.generate_content([f"Give a summary of the text {transcript}"], stream=True)
|
62 |
return model_response.text
|
|
|
|
|
63 |
# Streamlit UI
|
64 |
|
65 |
youtube_url_tab, file_select_tab, audio_file_tab = st.tabs(
|
66 |
["Youtube url", "Video file", "Audio file"]
|
67 |
)
|
68 |
-
|
69 |
with youtube_url_tab:
|
70 |
url = st.text_input("Enter the Youtube url")
|
71 |
try:
|
@@ -99,7 +101,7 @@ with file_select_tab:
|
|
99 |
summary = generate_ai_summary(video_transcript)
|
100 |
st.write(summary)
|
101 |
|
102 |
-
|
103 |
# Audio transcription
|
104 |
with audio_file_tab:
|
105 |
audio_file = st.file_uploader("Upload audio file", type="mp3")
|
|
|
60 |
model = google_genai.GenerativeModel('gemini-pro')
|
61 |
model_response = model.generate_content([f"Give a summary of the text {transcript}"], stream=True)
|
62 |
return model_response.text
|
63 |
+
|
64 |
+
|
65 |
# Streamlit UI
|
66 |
|
67 |
youtube_url_tab, file_select_tab, audio_file_tab = st.tabs(
|
68 |
["Youtube url", "Video file", "Audio file"]
|
69 |
)
|
70 |
+
|
71 |
with youtube_url_tab:
|
72 |
url = st.text_input("Enter the Youtube url")
|
73 |
try:
|
|
|
101 |
summary = generate_ai_summary(video_transcript)
|
102 |
st.write(summary)
|
103 |
|
104 |
+
|
105 |
# Audio transcription
|
106 |
with audio_file_tab:
|
107 |
audio_file = st.file_uploader("Upload audio file", type="mp3")
|