Update app.py
Browse files
app.py
CHANGED
|
@@ -1,10 +1,23 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
import random
|
| 2 |
import gradio as gr
|
| 3 |
from huggingface_hub import InferenceClient
|
| 4 |
|
|
|
|
|
|
|
|
|
|
|
|
|
| 5 |
def random_response(message, history):
|
| 6 |
return random.choice(["Yes", "No"])
|
| 7 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 8 |
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
|
| 9 |
gr.HTML("""<a href="https://visitorbadge.io/status?path=https%3A%2F%2Fhuggingface.co%2Fspaces%2Fzelk12%2FChat_interface_test">
|
| 10 |
<img src="https://api.visitorbadge.io/api/combined?path=https%3A%2F%2Fhuggingface.co%2Fspaces%2Fzelk12%2FChat_interface_test&countColor=%23263759" />
|
|
|
|
| 1 |
+
#=========
|
| 2 |
+
#=========
|
| 3 |
+
# Library Import
|
| 4 |
+
|
| 5 |
import random
|
| 6 |
import gradio as gr
|
| 7 |
from huggingface_hub import InferenceClient
|
| 8 |
|
| 9 |
+
#=========
|
| 10 |
+
#=========
|
| 11 |
+
# Backend Logic
|
| 12 |
+
|
| 13 |
def random_response(message, history):
|
| 14 |
return random.choice(["Yes", "No"])
|
| 15 |
|
| 16 |
+
|
| 17 |
+
# =========
|
| 18 |
+
# =========
|
| 19 |
+
# User Interface (UI) Definition
|
| 20 |
+
|
| 21 |
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
|
| 22 |
gr.HTML("""<a href="https://visitorbadge.io/status?path=https%3A%2F%2Fhuggingface.co%2Fspaces%2Fzelk12%2FChat_interface_test">
|
| 23 |
<img src="https://api.visitorbadge.io/api/combined?path=https%3A%2F%2Fhuggingface.co%2Fspaces%2Fzelk12%2FChat_interface_test&countColor=%23263759" />
|