not-lain commited on
Commit
fdd8ddb
β€’
1 Parent(s): e4f812c

🌘wπŸŒ–

Browse files
Files changed (1) hide show
  1. app.py +3 -3
app.py CHANGED
@@ -50,7 +50,7 @@ def prepare_prompt(query, retrieved_examples):
50
  titles = titles[::-1]
51
  for i in range(TOP_K):
52
  prompt += f"Title: {titles[i]}, Text: {texts[i]}\n"
53
- return prompt, (titles, urls)
54
 
55
 
56
  @spaces.GPU(duration=150)
@@ -93,9 +93,9 @@ def talk(message, history):
93
  for new_text in streamer:
94
  partial_text += new_text
95
  print("partial_text : ", partial_text)
96
- # yield partial_text
97
  partial_text += resources
98
- return partial_text
99
 
100
 
101
  TITLE = "# RAG"
 
50
  titles = titles[::-1]
51
  for i in range(TOP_K):
52
  prompt += f"Title: {titles[i]}, Text: {texts[i]}\n"
53
+ return prompt, zip(titles, urls)
54
 
55
 
56
  @spaces.GPU(duration=150)
 
93
  for new_text in streamer:
94
  partial_text += new_text
95
  print("partial_text : ", partial_text)
96
+ yield partial_text
97
  partial_text += resources
98
+ yield partial_text
99
 
100
 
101
  TITLE = "# RAG"