not-lain commited on
Commit
0a96a17
β€’
1 Parent(s): 31630cf

🌘wπŸŒ–

Browse files
Files changed (1) hide show
  1. app.py +2 -4
app.py CHANGED
@@ -31,7 +31,6 @@ data = load_dataset("not-lain/wikipedia-small-3000-embedded", split="train")
31
  data.add_faiss_index("embedding")
32
 
33
 
34
- @spaces.GPU
35
  def search(query: str, k: int = TOP_K):
36
  embedded_query = RAG.encode(query)
37
  scores, retrieved_examples = data.get_nearest_examples(
@@ -94,8 +93,8 @@ def talk(message, history):
94
  for new_text in streamer:
95
  partial_text += new_text
96
  yield partial_text
97
- # partial_text += resources
98
- # return partial_text
99
 
100
 
101
  TITLE = "RAG"
@@ -124,7 +123,6 @@ demo = gr.ChatInterface(
124
  likeable=True,
125
  layout="bubble",
126
  bubble_full_width=False,
127
- label="RAG chatbot"
128
  ),
129
  theme="Soft",
130
  examples=[["what is machine learning"]],
 
31
  data.add_faiss_index("embedding")
32
 
33
 
 
34
  def search(query: str, k: int = TOP_K):
35
  embedded_query = RAG.encode(query)
36
  scores, retrieved_examples = data.get_nearest_examples(
 
93
  for new_text in streamer:
94
  partial_text += new_text
95
  yield partial_text
96
+ partial_text += resources
97
+ return partial_text
98
 
99
 
100
  TITLE = "RAG"
 
123
  likeable=True,
124
  layout="bubble",
125
  bubble_full_width=False,
 
126
  ),
127
  theme="Soft",
128
  examples=[["what is machine learning"]],