Hemanth-thunder
commited on
Commit
·
78a4974
1
Parent(s):
bbd6db5
added stream
Browse files
app.py
CHANGED
@@ -19,8 +19,10 @@ llm = AutoModelForCausalLM.from_pretrained(model_name, model_file=model_file,
|
|
19 |
model_type="mistral", gpu_layers=0)
|
20 |
def alternatingly_agree(message, history):
|
21 |
prompt = prompt.format(message)
|
22 |
-
result = llm(message,max_new_tokens=50,temperature=0.7)
|
23 |
-
|
|
|
|
|
24 |
|
25 |
|
26 |
gr.ChatInterface(alternatingly_agree).launch()
|
|
|
19 |
model_type="mistral", gpu_layers=0)
|
20 |
def alternatingly_agree(message, history):
|
21 |
prompt = prompt.format(message)
|
22 |
+
result = llm(message,max_new_tokens=50,temperature=0.7,stream=True)
|
23 |
+
for i in result:
|
24 |
+
yield i
|
25 |
+
|
26 |
|
27 |
|
28 |
gr.ChatInterface(alternatingly_agree).launch()
|