Update app.py
Browse files
app.py
CHANGED
|
@@ -1,15 +1,15 @@
|
|
| 1 |
import gradio as gr
|
| 2 |
from huggingface_hub import InferenceClient
|
| 3 |
|
| 4 |
-
def
|
| 5 |
-
|
| 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(
|
| 13 |
multimodal=True,
|
| 14 |
type="messages",
|
| 15 |
textbox=gr.MultimodalTextbox(),
|
|
|
|
| 1 |
import gradio as gr
|
| 2 |
from huggingface_hub import InferenceClient
|
| 3 |
|
| 4 |
+
def random_response(message, history):
|
| 5 |
+
return random.choice(["Yes", "No"])
|
| 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(random_response,
|
| 13 |
multimodal=True,
|
| 14 |
type="messages",
|
| 15 |
textbox=gr.MultimodalTextbox(),
|