el-filatova commited on
Commit
1486ad4
·
verified ·
1 Parent(s): 7cccaf1

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +8 -7
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
- model =
21
- pipeline = transformers.pipeline(
22
- "text-generation",
23
- model='el-filatova/rag',
24
- tokenizer=tokenizer,
25
- torch_dtype=torch.float16,
26
- device_map="auto", max_new_tokens=200)
 
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()