Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -10,12 +10,10 @@ class ChatWrapper:
|
|
10 |
def __call__(
|
11 |
self, inp: str, history: str, chain
|
12 |
):
|
13 |
-
"""Execute the chat functionality."""
|
14 |
-
|
15 |
-
|
16 |
-
|
17 |
-
|
18 |
-
return history, history
|
19 |
|
20 |
|
21 |
block = gr.Blocks(css=".gradio-container {background-color: gray}")
|
|
|
10 |
def __call__(
|
11 |
self, inp: str, history: str, chain
|
12 |
):
|
13 |
+
"""Execute the chat functionality."""
|
14 |
+
output = chain({"question": inp, "chat_history": history})["answer"]
|
15 |
+
history.append((inp, output))
|
16 |
+
return history, history
|
|
|
|
|
17 |
|
18 |
|
19 |
block = gr.Blocks(css=".gradio-container {background-color: gray}")
|