Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
|
@@ -17,13 +17,14 @@ def ask(pipeline, query, temperature=0.7, top_k=50, top_p=0.95):
|
|
| 17 |
else:
|
| 18 |
return "I don't have any information to answer this question", docs
|
| 19 |
|
| 20 |
-
|
| 21 |
-
|
| 22 |
-
|
| 23 |
-
|
| 24 |
-
|
| 25 |
-
|
| 26 |
-
|
|
|
|
| 27 |
|
| 28 |
with gr.Blocks() as demo:
|
| 29 |
chatbot = gr.Chatbot()
|
|
|
|
| 17 |
else:
|
| 18 |
return "I don't have any information to answer this question", docs
|
| 19 |
|
| 20 |
+
pipeline = transformers.pipeline('text-generation', model='el-filatova/rag')
|
| 21 |
+
|
| 22 |
+
# pipeline = transformers.pipeline(
|
| 23 |
+
# "text-generation",
|
| 24 |
+
# model='el-filatova/rag',
|
| 25 |
+
# tokenizer=tokenizer,
|
| 26 |
+
# torch_dtype=torch.float16,
|
| 27 |
+
# device_map="auto", max_new_tokens=200)
|
| 28 |
|
| 29 |
with gr.Blocks() as demo:
|
| 30 |
chatbot = gr.Chatbot()
|