Namitg02 commited on
Commit
b374ad5
·
verified ·
1 Parent(s): 1b3dd55

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -5
app.py CHANGED
@@ -80,16 +80,15 @@ from transformers import AutoTokenizer
80
  tokenizer = AutoTokenizer.from_pretrained(llm_model)
81
 
82
  print("check2")
83
- pipe = pipeline(model = llm_model, tokenizer = tokenizer, task="text-generation",chat = qa_chat_prompt)
84
  #"question-answering", "conversational"
85
 
86
  print("check3")
87
-
88
- #chain = qa_chat_prompt | pipe
89
-
90
  import gradio as gr
91
  #ragdemo = gr.load("models/HuggingFaceH4/zephyr-7b-beta")
92
- ragdemo = gr.Interface.from_pipeline(pipe)
93
  print("check4")
94
  ragdemo.launch()
95
  print("check5")
 
80
  tokenizer = AutoTokenizer.from_pretrained(llm_model)
81
 
82
  print("check2")
83
+ pipe = pipeline(model = llm_model, tokenizer = tokenizer, task = "question-answering", temperature=0.2)
84
  #"question-answering", "conversational"
85
 
86
  print("check3")
87
+ chain = pipe(qa_chat_prompt,retriever)
88
+ print("check3A")
 
89
  import gradio as gr
90
  #ragdemo = gr.load("models/HuggingFaceH4/zephyr-7b-beta")
91
+ ragdemo = gr.Interface.from_pipeline(chain)
92
  print("check4")
93
  ragdemo.launch()
94
  print("check5")