Pengi5659 commited on
Commit
ed50303
·
verified ·
1 Parent(s): 4295d10

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +19 -6
app.py CHANGED
@@ -3,13 +3,26 @@
3
  import gradio as gr
4
  import random as rd
5
  from huggingface_hub import InferenceClient
 
 
6
  client = InferenceClient("Qwen/Qwen2.5-72B-Instruct")
7
- css = """
8
- .gradio-container {
9
- background-color: #8C9A61; /* Sage Green */
10
- font-family: 'Times New Roman', Times, serif;
11
- }
12
- """
 
 
 
 
 
 
 
 
 
 
 
13
  def respond (message, history):
14
  messages = [{"role": "system", "content": "You are a chatbot who is sassy and doesnt explain an anser unless someone asks twice."}]
15
  if history:
 
3
  import gradio as gr
4
  import random as rd
5
  from huggingface_hub import InferenceClient
6
+ from gradio.themes.base import Base
7
+ import time
8
  client = InferenceClient("Qwen/Qwen2.5-72B-Instruct")
9
+ seafoam = Seafoam()
10
+
11
+ with gr.Blocks(theme=seafoam) as demo:
12
+ textbox = gr.Textbox(label="Name")
13
+ slider = gr.Slider(label="Count", minimum=0, maximum=100, step=1)
14
+ with gr.Row():
15
+ button = gr.Button("Submit", variant="primary")
16
+ clear = gr.Button("Clear")
17
+ output = gr.Textbox(label="Output")
18
+
19
+ def repeat(name, count):
20
+ time.sleep(3)
21
+ return name * count
22
+
23
+ button.click(repeat, [textbox, slider], output)
24
+
25
+ demo.launch()
26
  def respond (message, history):
27
  messages = [{"role": "system", "content": "You are a chatbot who is sassy and doesnt explain an anser unless someone asks twice."}]
28
  if history: