Spaces:
Running
on
CPU Upgrade
Running
on
CPU Upgrade
Update backup20.claude.app.py
Browse files- backup20.claude.app.py +6 -4
backup20.claude.app.py
CHANGED
@@ -507,11 +507,12 @@ def perform_ai_lookup(q, vocal_summary=True, extended_refs=False,
|
|
507 |
play_and_download_audio(audio_file, st.session_state['audio_format'])
|
508 |
|
509 |
# --- 2) Arxiv RAG
|
510 |
-
st.write("Arxiv's AI this Evening is Mixtral 8x7B...")
|
|
|
511 |
client = Client("awacke1/Arxiv-Paper-Search-And-QA-RAG-Pattern")
|
512 |
refs = client.predict(
|
513 |
q,
|
514 |
-
|
515 |
"Semantic Search",
|
516 |
"mistralai/Mixtral-8x7B-Instruct-v0.1",
|
517 |
api_name="/update_with_rag_md"
|
@@ -537,7 +538,8 @@ def perform_ai_lookup(q, vocal_summary=True, extended_refs=False,
|
|
537 |
st.write("Claude's reply 🧠:")
|
538 |
st.markdown(r2)
|
539 |
|
540 |
-
result = f"### 🔎 {q}\n\n{r2}\n\n{refs}"
|
|
|
541 |
md_file, audio_file = save_qa_with_audio(q, result)
|
542 |
st.subheader("📝 Main Response Audio")
|
543 |
play_and_download_audio(audio_file, st.session_state['audio_format'])
|
@@ -614,7 +616,7 @@ def display_file_history_in_sidebar():
|
|
614 |
st.session_state.should_rerun = True
|
615 |
with col4:
|
616 |
if st.button("⬇️ Zip All"):
|
617 |
-
zip_name = create_zip_of_files(
|
618 |
if zip_name:
|
619 |
st.sidebar.markdown(get_download_link(zip_name, "zip"), unsafe_allow_html=True)
|
620 |
|
|
|
507 |
play_and_download_audio(audio_file, st.session_state['audio_format'])
|
508 |
|
509 |
# --- 2) Arxiv RAG
|
510 |
+
#st.write("Arxiv's AI this Evening is Mixtral 8x7B...")
|
511 |
+
st.write('Running Arxiv RAG with Claude inputs.')
|
512 |
client = Client("awacke1/Arxiv-Paper-Search-And-QA-RAG-Pattern")
|
513 |
refs = client.predict(
|
514 |
q,
|
515 |
+
10,
|
516 |
"Semantic Search",
|
517 |
"mistralai/Mixtral-8x7B-Instruct-v0.1",
|
518 |
api_name="/update_with_rag_md"
|
|
|
538 |
st.write("Claude's reply 🧠:")
|
539 |
st.markdown(r2)
|
540 |
|
541 |
+
#result = f"### 🔎 {q}\n\n{r2}\n\n{refs}"
|
542 |
+
result = f"🔎 {r2}\n\n{refs}"
|
543 |
md_file, audio_file = save_qa_with_audio(q, result)
|
544 |
st.subheader("📝 Main Response Audio")
|
545 |
play_and_download_audio(audio_file, st.session_state['audio_format'])
|
|
|
616 |
st.session_state.should_rerun = True
|
617 |
with col4:
|
618 |
if st.button("⬇️ Zip All"):
|
619 |
+
zip_name = create_zip_of_files(md_files, mp3_files, wav_files, st.session_state.get('last_query', ''))
|
620 |
if zip_name:
|
621 |
st.sidebar.markdown(get_download_link(zip_name, "zip"), unsafe_allow_html=True)
|
622 |
|