Spaces:
Sleeping
Sleeping
theme
Browse files
app.py
CHANGED
|
@@ -2,23 +2,6 @@ import gradio as gr
|
|
| 2 |
import random
|
| 3 |
from huggingface_hub import InferenceClient
|
| 4 |
|
| 5 |
-
custom_css = """
|
| 6 |
-
body {
|
| 7 |
-
background-color: #ff5733; /* dark background */
|
| 8 |
-
color: white; /* white text */
|
| 9 |
-
}
|
| 10 |
-
.gr-button {
|
| 11 |
-
background-color: #007acc;
|
| 12 |
-
color: white;
|
| 13 |
-
}
|
| 14 |
-
.gr-textbox {
|
| 15 |
-
background-color: #333;
|
| 16 |
-
color: #fff;
|
| 17 |
-
}
|
| 18 |
-
"""
|
| 19 |
-
with gr.Blocks(css=custom_css) as demo:
|
| 20 |
-
gr.Markdown("welcome to the chatbot!")
|
| 21 |
-
|
| 22 |
client = InferenceClient ("HuggingFaceH4/zephyr-7b-beta") #change the LLM
|
| 23 |
|
| 24 |
def respond(message, history):
|
|
@@ -47,6 +30,6 @@ def random_message(message, history):
|
|
| 47 |
random_choices = random.choice(choices)
|
| 48 |
return random_choices
|
| 49 |
|
| 50 |
-
chatbot = gr.ChatInterface(respond, type = "messages")
|
| 51 |
|
| 52 |
chatbot.launch(debug=True)
|
|
|
|
| 2 |
import random
|
| 3 |
from huggingface_hub import InferenceClient
|
| 4 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 5 |
client = InferenceClient ("HuggingFaceH4/zephyr-7b-beta") #change the LLM
|
| 6 |
|
| 7 |
def respond(message, history):
|
|
|
|
| 30 |
random_choices = random.choice(choices)
|
| 31 |
return random_choices
|
| 32 |
|
| 33 |
+
chatbot = gr.ChatInterface(respond, type = "messages", themes = "'NoCrypt/miku'")
|
| 34 |
|
| 35 |
chatbot.launch(debug=True)
|