Spaces:
Runtime error
Runtime error
armandstrickernlp
commited on
Commit
·
67f4fec
1
Parent(s):
a233482
create chatbot
Browse files
app.py
CHANGED
|
@@ -13,6 +13,8 @@ def generate_response(prompt):
|
|
| 13 |
eos_token_id=50262)
|
| 14 |
return tokenizer_TOD.batch_decode(outputs)[0]
|
| 15 |
|
|
|
|
|
|
|
| 16 |
def chat(message, history):
|
| 17 |
history = history or []
|
| 18 |
|
|
@@ -22,7 +24,7 @@ def chat(message, history):
|
|
| 22 |
|
| 23 |
history.append((context+'<|endofcontext|>', response))
|
| 24 |
|
| 25 |
-
return history
|
| 26 |
|
| 27 |
|
| 28 |
import gradio as gr
|
|
|
|
| 13 |
eos_token_id=50262)
|
| 14 |
return tokenizer_TOD.batch_decode(outputs)[0]
|
| 15 |
|
| 16 |
+
#<|context|> <|user|> I want to go to the restaurant.<|endofcontext|>
|
| 17 |
+
|
| 18 |
def chat(message, history):
|
| 19 |
history = history or []
|
| 20 |
|
|
|
|
| 24 |
|
| 25 |
history.append((context+'<|endofcontext|>', response))
|
| 26 |
|
| 27 |
+
return history, history
|
| 28 |
|
| 29 |
|
| 30 |
import gradio as gr
|