Spaces:
Sleeping
Sleeping
Yingxu He
commited on
Update app.py
Browse files
app.py
CHANGED
@@ -48,17 +48,12 @@ def add_text(history, text):
|
|
48 |
|
49 |
def bot(history):
|
50 |
print(history)
|
51 |
-
|
52 |
-
history[-1][
|
53 |
|
54 |
-
|
55 |
-
|
56 |
-
|
57 |
-
def infer(question):
|
58 |
-
|
59 |
-
result = chain.run(text=question).strip()
|
60 |
-
print(result)
|
61 |
-
return result
|
62 |
|
63 |
|
64 |
css = """
|
|
|
48 |
|
49 |
def bot(history):
|
50 |
print(history)
|
51 |
+
history[-1][1] = ""
|
52 |
+
user_message = history[-1][0]
|
53 |
|
54 |
+
for chunk in chain.stream({"text": user_message}):
|
55 |
+
history[-1][1] += chunk
|
56 |
+
yield history
|
|
|
|
|
|
|
|
|
|
|
57 |
|
58 |
|
59 |
css = """
|