awacke1 commited on
Commit
1088a98
·
verified ·
1 Parent(s): 1f36af1

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +5 -3
app.py CHANGED
@@ -368,7 +368,7 @@ def parse_arxiv_refs(ref_text: str):
368
 
369
 
370
 
371
- # ----------------------------
372
 
373
  def perform_ai_lookup(q, vocal_summary=True, extended_refs=False,
374
  titles_summary=True, full_audio=False):
@@ -449,10 +449,10 @@ Remember to balance scientific accuracy with musical creativity, ensuring that y
449
 
450
 
451
  client = Client("awacke1/Arxiv-Paper-Search-And-QA-RAG-Pattern")
452
- refs = client.predict(q, 20, "Semantic Search",
453
  "mistralai/Mixtral-8x7B-Instruct-v0.1",
454
  api_name="/update_with_rag_md")[0]
455
- r2 = client.predict(q, "mistralai/Mixtral-8x7B-Instruct-v0.1",
456
  True, api_name="/ask_llm")
457
 
458
 
@@ -460,6 +460,8 @@ Remember to balance scientific accuracy with musical creativity, ensuring that y
460
  result = f"### 🔎 {q}\n\n{r2}\n\n{refs}"
461
  st.markdown(result)
462
 
 
 
463
  md_file, audio_file = save_qa_with_audio(q, result)
464
 
465
  st.subheader("📝 Main Response Audio")
 
368
 
369
 
370
 
371
+ # ---------------------------- Edit 1/11/2025 - add a constitution to my arxiv system templating to build configurable character and personality of IO.
372
 
373
  def perform_ai_lookup(q, vocal_summary=True, extended_refs=False,
374
  titles_summary=True, full_audio=False):
 
449
 
450
 
451
  client = Client("awacke1/Arxiv-Paper-Search-And-QA-RAG-Pattern")
452
+ refs = client.predict(ai_constitution + q, 20, "Semantic Search",
453
  "mistralai/Mixtral-8x7B-Instruct-v0.1",
454
  api_name="/update_with_rag_md")[0]
455
+ r2 = client.predict(ai_constitution + q, "mistralai/Mixtral-8x7B-Instruct-v0.1",
456
  True, api_name="/ask_llm")
457
 
458
 
 
460
  result = f"### 🔎 {q}\n\n{r2}\n\n{refs}"
461
  st.markdown(result)
462
 
463
+ st.markdown(ai_constitution)
464
+
465
  md_file, audio_file = save_qa_with_audio(q, result)
466
 
467
  st.subheader("📝 Main Response Audio")