Spaces:
Build error
Build error
Update app.py
Browse files
app.py
CHANGED
|
@@ -70,7 +70,9 @@ def predict(message, history):
|
|
| 70 |
yield partialMessage
|
| 71 |
|
| 72 |
pprint(f"[Tokens={chunkCount}] {message}")
|
| 73 |
-
|
|
|
|
|
|
|
| 74 |
|
| 75 |
with gr.ChatInterface(
|
| 76 |
predict,
|
|
@@ -84,6 +86,7 @@ with gr.ChatInterface(
|
|
| 84 |
max_lines=2,
|
| 85 |
)
|
| 86 |
) as demo:
|
|
|
|
| 87 |
demo.load(__attachIp, None, None)
|
| 88 |
|
| 89 |
|
|
|
|
| 70 |
yield partialMessage
|
| 71 |
|
| 72 |
pprint(f"[Tokens={chunkCount}] {message}")
|
| 73 |
+
|
| 74 |
+
def initial_message():
|
| 75 |
+
return [("Hey, I am Jeff Bezos, Founder of Amazon. How can I help you today?", "")]
|
| 76 |
|
| 77 |
with gr.ChatInterface(
|
| 78 |
predict,
|
|
|
|
| 86 |
max_lines=2,
|
| 87 |
)
|
| 88 |
) as demo:
|
| 89 |
+
demo.load(initial_message, None, "chatbot")
|
| 90 |
demo.load(__attachIp, None, None)
|
| 91 |
|
| 92 |
|