Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
@@ -1,6 +1,8 @@
|
|
1 |
import gradio as gr
|
2 |
import requests
|
3 |
import os
|
|
|
|
|
4 |
|
5 |
api_key = os.environ.get("HYPERBOLIC_API_KEY")
|
6 |
url = "https://api.hyperbolic.xyz/v1/chat/completions"
|
@@ -47,6 +49,8 @@ def chat(message, history):
|
|
47 |
|
48 |
bot_message = hyperbolic(message)
|
49 |
history.append((message, bot_message))
|
|
|
|
|
50 |
return history
|
51 |
|
52 |
if __name__ == '__main__':
|
|
|
1 |
import gradio as gr
|
2 |
import requests
|
3 |
import os
|
4 |
+
from IPython.display import display
|
5 |
+
from IPython.display import Markdown
|
6 |
|
7 |
api_key = os.environ.get("HYPERBOLIC_API_KEY")
|
8 |
url = "https://api.hyperbolic.xyz/v1/chat/completions"
|
|
|
49 |
|
50 |
bot_message = hyperbolic(message)
|
51 |
history.append((message, bot_message))
|
52 |
+
display(Markdown(bot_message))
|
53 |
+
return bot_message
|
54 |
return history
|
55 |
|
56 |
if __name__ == '__main__':
|