Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -1,12 +1,24 @@
|
|
1 |
import gradio as gr
|
2 |
from huggingface_hub import InferenceClient
|
3 |
|
|
|
|
|
|
|
4 |
with gr.Blocks(theme=gr.themes.Soft(primary_hue="teal", secondary_hue="slate", neutral_hue="neutral")) as demo: # Using Soft theme with adjusted hues for a refined look
|
5 |
-
gr.Markdown("Chat interface test")
|
6 |
-
|
7 |
gr.HTML("""<a href="https://visitorbadge.io/status?path=https%3A%2F%2Fhuggingface.co%2Fspaces%2Fzelk12%2FChat_interface_test">
|
8 |
<img src="https://api.visitorbadge.io/api/combined?path=https%3A%2F%2Fhuggingface.co%2Fspaces%2Fzelk12%2FChat_interface_test&countColor=%23263759" />
|
9 |
</a>""")
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
10 |
|
11 |
if __name__ == "__main__":
|
12 |
demo.launch()
|
|
|
1 |
import gradio as gr
|
2 |
from huggingface_hub import InferenceClient
|
3 |
|
4 |
+
def test():
|
5 |
+
print()
|
6 |
+
|
7 |
with gr.Blocks(theme=gr.themes.Soft(primary_hue="teal", secondary_hue="slate", neutral_hue="neutral")) as demo: # Using Soft theme with adjusted hues for a refined look
|
|
|
|
|
8 |
gr.HTML("""<a href="https://visitorbadge.io/status?path=https%3A%2F%2Fhuggingface.co%2Fspaces%2Fzelk12%2FChat_interface_test">
|
9 |
<img src="https://api.visitorbadge.io/api/combined?path=https%3A%2F%2Fhuggingface.co%2Fspaces%2Fzelk12%2FChat_interface_test&countColor=%23263759" />
|
10 |
</a>""")
|
11 |
+
|
12 |
+
gr.ChatInterface(test,
|
13 |
+
multimodal=True,
|
14 |
+
type="messages",
|
15 |
+
textbox=gr.MultimodalTextbox(),
|
16 |
+
editable=True,
|
17 |
+
title="Chat interface test",
|
18 |
+
save_history=True,
|
19 |
+
)
|
20 |
+
gr.Textbox(label="System instructions",)
|
21 |
+
gr.Slider(label="temperature",)
|
22 |
|
23 |
if __name__ == "__main__":
|
24 |
demo.launch()
|