Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -76,9 +76,9 @@ def transcribe_audio(audio_path: str) -> str:
|
|
76 |
|
77 |
def generate_summary(transcript_text: str) -> str:
|
78 |
"""Generate a concise summary of the transcript using OpenAI."""
|
79 |
-
prompt = f"Summarize the following
|
80 |
messages = [
|
81 |
-
{"role": "system", "content": "You are an
|
82 |
{"role": "user", "content": prompt}
|
83 |
]
|
84 |
completion = client.chat.completions.create(model="gpt-4o-mini", messages=messages)
|
@@ -149,7 +149,7 @@ if "chat_history" not in st.session_state:
|
|
149 |
# Main Display Area
|
150 |
# ---------------------------
|
151 |
st.title("Video Chat")
|
152 |
-
st.
|
153 |
|
154 |
if "transcript_text" not in st.session_state or not st.session_state.transcript_text:
|
155 |
st.info("Please provide a video input from the sidebar to begin.")
|
|
|
76 |
|
77 |
def generate_summary(transcript_text: str) -> str:
|
78 |
"""Generate a concise summary of the transcript using OpenAI."""
|
79 |
+
prompt = f"Summarize the following video transcript in a concise manner, highlighting the key points that the user should know:\n\n{transcript_text}. Feel free to use bullet points, bold, italics and headers to empasize key points where necessary"
|
80 |
messages = [
|
81 |
+
{"role": "system", "content": "You are an helpful assistant."},
|
82 |
{"role": "user", "content": prompt}
|
83 |
]
|
84 |
completion = client.chat.completions.create(model="gpt-4o-mini", messages=messages)
|
|
|
149 |
# Main Display Area
|
150 |
# ---------------------------
|
151 |
st.title("Video Chat")
|
152 |
+
st.write('Tired of watching long boring videos? Summarize your videos in seconds or just chat!')
|
153 |
|
154 |
if "transcript_text" not in st.session_state or not st.session_state.transcript_text:
|
155 |
st.info("Please provide a video input from the sidebar to begin.")
|