Spaces:
Runtime error
Runtime error
michailroussos
commited on
Commit
·
f5a59a6
1
Parent(s):
bad2083
more
Browse files
app.py
CHANGED
@@ -42,7 +42,9 @@ def respond(message, history, system_message, max_tokens, temperature, top_p):
|
|
42 |
top_p=top_p,
|
43 |
)
|
44 |
response = tokenizer.decode(generated_tokens[0], skip_special_tokens=True)
|
45 |
-
|
|
|
|
|
46 |
|
47 |
# Define the Gradio interface
|
48 |
demo = gr.ChatInterface(
|
@@ -57,4 +59,4 @@ demo = gr.ChatInterface(
|
|
57 |
)
|
58 |
|
59 |
if __name__ == "__main__":
|
60 |
-
demo.launch(share=
|
|
|
42 |
top_p=top_p,
|
43 |
)
|
44 |
response = tokenizer.decode(generated_tokens[0], skip_special_tokens=True)
|
45 |
+
|
46 |
+
history.append((message, response)) # Update history with new exchange
|
47 |
+
return history # Return the updated history
|
48 |
|
49 |
# Define the Gradio interface
|
50 |
demo = gr.ChatInterface(
|
|
|
59 |
)
|
60 |
|
61 |
if __name__ == "__main__":
|
62 |
+
demo.launch(share=False) # Set share=False for local testing
|