Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -304,11 +304,6 @@ def generate_answer(user_input):
|
|
304 |
with torch.inference_mode():
|
305 |
output = model.generate(inputs = input_ids, temperature=0.7, max_new_tokens=512)
|
306 |
|
307 |
-
|
308 |
-
# print(tokenizer.decode(output[0]))
|
309 |
-
|
310 |
-
generation_config
|
311 |
-
|
312 |
streamer = TextStreamer(
|
313 |
tokenizer, skip_prompt=True, skip_special_tokens=True, use_multiprocessing=False
|
314 |
)
|
@@ -372,7 +367,7 @@ def generate_answer(user_input):
|
|
372 |
|
373 |
question = "when is the result of GKS is announced?"
|
374 |
docs = db.similarity_search(question)
|
375 |
-
answer = chain.run({"input_documents":docs, "question":user_input})
|
376 |
return answer.strip()
|
377 |
|
378 |
gr.ChatInterface(generate_answer,
|
|
|
304 |
with torch.inference_mode():
|
305 |
output = model.generate(inputs = input_ids, temperature=0.7, max_new_tokens=512)
|
306 |
|
|
|
|
|
|
|
|
|
|
|
307 |
streamer = TextStreamer(
|
308 |
tokenizer, skip_prompt=True, skip_special_tokens=True, use_multiprocessing=False
|
309 |
)
|
|
|
367 |
|
368 |
question = "when is the result of GKS is announced?"
|
369 |
docs = db.similarity_search(question)
|
370 |
+
answer = chain.run({"input_documents": docs, "question": user_input})
|
371 |
return answer.strip()
|
372 |
|
373 |
gr.ChatInterface(generate_answer,
|