Spaces:
Running
on
CPU Upgrade
Running
on
CPU Upgrade
Update app.py
Browse files
app.py
CHANGED
@@ -320,7 +320,7 @@ def save_qa_with_audio(question, answer, voice=None):
|
|
320 |
return md_file, audio_file
|
321 |
|
322 |
def process_paper_content(paper):
|
323 |
-
marquee_text = f"📄 {paper['title']} | 👤 {paper['authors'][:100]} | 📝 {paper['summary'][:
|
324 |
audio_text = f"{paper['title']} by {paper['authors']}. {paper['summary']}"
|
325 |
return marquee_text, audio_text
|
326 |
|
@@ -472,6 +472,9 @@ def perform_ai_lookup(q, vocal_summary=True, extended_refs=False,
|
|
472 |
"""
|
473 |
|
474 |
|
|
|
|
|
|
|
475 |
# Claude then Arxiv..
|
476 |
|
477 |
# Claude:
|
@@ -487,11 +490,20 @@ def perform_ai_lookup(q, vocal_summary=True, extended_refs=False,
|
|
487 |
|
488 |
st.write("Claude's reply 🧠:")
|
489 |
st.markdown(response.content[0].text)
|
490 |
-
|
|
|
491 |
#filename = generate_filename(q, response.content[0].text)
|
492 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
493 |
|
494 |
|
|
|
|
|
495 |
# Arxiv:
|
496 |
st.write("Arxiv's AI this Evening is Mixtral 8x7B MoE Instruct with 9 English Voices 🧠:")
|
497 |
|
|
|
320 |
return md_file, audio_file
|
321 |
|
322 |
def process_paper_content(paper):
|
323 |
+
marquee_text = f"📄 {paper['title']} | 👤 {paper['authors'][:100]} | 📝 {paper['summary'][:500]}"
|
324 |
audio_text = f"{paper['title']} by {paper['authors']}. {paper['summary']}"
|
325 |
return marquee_text, audio_text
|
326 |
|
|
|
472 |
"""
|
473 |
|
474 |
|
475 |
+
|
476 |
+
|
477 |
+
|
478 |
# Claude then Arxiv..
|
479 |
|
480 |
# Claude:
|
|
|
490 |
|
491 |
st.write("Claude's reply 🧠:")
|
492 |
st.markdown(response.content[0].text)
|
493 |
+
|
494 |
+
# Render audio track for Claude Response
|
495 |
#filename = generate_filename(q, response.content[0].text)
|
496 |
+
result = response.content[0].text
|
497 |
+
create_file(q, result)
|
498 |
+
# Save and produce audio for Claude response
|
499 |
+
md_file, audio_file = save_qa_with_audio(q, result)
|
500 |
+
st.subheader("📝 Main Response Audio")
|
501 |
+
play_and_download_audio(audio_file, st.session_state['audio_format'])
|
502 |
+
|
503 |
|
504 |
|
505 |
+
|
506 |
+
|
507 |
# Arxiv:
|
508 |
st.write("Arxiv's AI this Evening is Mixtral 8x7B MoE Instruct with 9 English Voices 🧠:")
|
509 |
|