Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -226,10 +226,13 @@ def get_llama_response(message: str, history: list) -> str:
|
|
226 |
#print(template)
|
227 |
chain.prompt=prompt
|
228 |
print(4444444444444444444444444444444444444444444444)
|
229 |
-
res = chain.invoke(query_text)
|
|
|
|
|
|
|
230 |
print(6666666666666666666666666666666666666666666666666666666666666666666666666666666666)
|
231 |
|
232 |
-
return(
|
233 |
|
234 |
import gradio as gr
|
235 |
|
|
|
226 |
#print(template)
|
227 |
chain.prompt=prompt
|
228 |
print(4444444444444444444444444444444444444444444444)
|
229 |
+
#res = chain.invoke(query_text)
|
230 |
+
inputs = tokenizer(query_text, return_tensors="pt")
|
231 |
+
outputs = model.generate(inputs.input_ids)
|
232 |
+
response = tokenizer.decode(outputs[0], skip_special_tokens=True)
|
233 |
print(6666666666666666666666666666666666666666666666666666666666666666666666666666666666)
|
234 |
|
235 |
+
return(response)
|
236 |
|
237 |
import gradio as gr
|
238 |
|