awacke1 commited on
Commit
8e010af
·
verified ·
1 Parent(s): e90888f

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +7 -5
app.py CHANGED
@@ -299,6 +299,8 @@ def save_full_transcript(query, text):
299
  """Save full transcript of Arxiv results as a file."""
300
  create_file(query, text, "md")
301
 
 
 
302
  def parse_arxiv_refs(ref_text: str):
303
  """
304
  Parse papers by finding lines with two pipe characters as title lines.
@@ -396,18 +398,15 @@ def display_papers(papers):
396
  # Audio controls in columns
397
  col1, col2 = st.columns(2)
398
 
399
- # Use URL as unique key for audio interface
400
- key_base = paper['url'].split('/')[-1] if paper['url'].startswith('http') else paper['url']
401
-
402
  with col1:
403
  if paper.get('title_audio'):
404
  st.write("🎙️ Title Audio")
405
- st.audio(paper['title_audio'], key=f"title_{key_base}")
406
 
407
  with col2:
408
  if paper.get('full_audio'):
409
  st.write("📚 Full Paper Audio")
410
- st.audio(paper['full_audio'], key=f"full_{key_base}")
411
 
412
  def perform_ai_lookup(q, vocal_summary=True, extended_refs=False,
413
  titles_summary=True, full_audio=False):
@@ -441,6 +440,9 @@ def perform_ai_lookup(q, vocal_summary=True, extended_refs=False,
441
  create_file(q, result, "md")
442
  return result
443
 
 
 
 
444
  def process_with_gpt(text):
445
  """Process text with GPT-4"""
446
  if not text:
 
299
  """Save full transcript of Arxiv results as a file."""
300
  create_file(query, text, "md")
301
 
302
+
303
+
304
  def parse_arxiv_refs(ref_text: str):
305
  """
306
  Parse papers by finding lines with two pipe characters as title lines.
 
398
  # Audio controls in columns
399
  col1, col2 = st.columns(2)
400
 
 
 
 
401
  with col1:
402
  if paper.get('title_audio'):
403
  st.write("🎙️ Title Audio")
404
+ st.audio(paper['title_audio'])
405
 
406
  with col2:
407
  if paper.get('full_audio'):
408
  st.write("📚 Full Paper Audio")
409
+ st.audio(paper['full_audio'])
410
 
411
  def perform_ai_lookup(q, vocal_summary=True, extended_refs=False,
412
  titles_summary=True, full_audio=False):
 
440
  create_file(q, result, "md")
441
  return result
442
 
443
+
444
+
445
+
446
  def process_with_gpt(text):
447
  """Process text with GPT-4"""
448
  if not text: