Tonic commited on
Commit
e6e8c33
1 Parent(s): 154ad64

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +8 -8
app.py CHANGED
@@ -6,13 +6,13 @@ import gradio as gr
6
 
7
  dropdown, js = create_theme_dropdown()
8
 
9
- with gr.Blocks(theme='Tonic/greenblast-alpha') as demo:
10
  with gr.Row().style(equal_height=True):
11
  with gr.Column(scale=10):
12
  gr.Markdown(
13
  """
14
  # Theme preview: `greenblast`
15
- To use this theme, set `theme='Tonic/greenblast-alpha'` in `gr.Blocks()` or `gr.Interface()`.
16
  """
17
  )
18
  with gr.Column(scale=3):
@@ -34,8 +34,8 @@ with gr.Blocks(theme='Tonic/greenblast-alpha') as demo:
34
  name = gr.Textbox(
35
  label="Name",
36
  info="Full name, including middle name. No special characters.",
37
- placeholder="John Doe",
38
- value="John Doe",
39
  interactive=True,
40
  )
41
 
@@ -95,7 +95,7 @@ with gr.Blocks(theme='Tonic/greenblast-alpha') as demo:
95
  gr.JSON(
96
  value={"a": 1, "b": 2, "c": {"test": "a", "test2": [1, 2, 3]}}, label="JSON"
97
  )
98
- gr.Label(value={"cat": 0.7, "dog": 0.2, "fish": 0.1})
99
  gr.File()
100
  with gr.Row():
101
  gr.ColorPicker()
@@ -119,12 +119,12 @@ with gr.Blocks(theme='Tonic/greenblast-alpha') as demo:
119
 
120
  with gr.Row():
121
  with gr.Column(scale=2):
122
- chatbot = gr.Chatbot([("Hello", "Hi")], label="Chatbot")
123
  chat_btn = gr.Button("Add messages")
124
 
125
  def chat(history):
126
  time.sleep(2)
127
- yield [["How are you?", "I am good."]]
128
 
129
  chat_btn.click(
130
  lambda history: history
@@ -135,7 +135,7 @@ with gr.Blocks(theme='Tonic/greenblast-alpha') as demo:
135
  )
136
  with gr.Column(scale=1):
137
  with gr.Accordion("Advanced Settings"):
138
- gr.Markdown("Hello")
139
  gr.Number(label="Chatbot control 1")
140
  gr.Number(label="Chatbot control 2")
141
  gr.Number(label="Chatbot control 3")
 
6
 
7
  dropdown, js = create_theme_dropdown()
8
 
9
+ with gr.Blocks(theme='Tonic/greenblast') as demo:
10
  with gr.Row().style(equal_height=True):
11
  with gr.Column(scale=10):
12
  gr.Markdown(
13
  """
14
  # Theme preview: `greenblast`
15
+ To use this theme, set `theme='Tonic/greenblast'` in `gr.Blocks()` or `gr.Interface()`.
16
  """
17
  )
18
  with gr.Column(scale=3):
 
34
  name = gr.Textbox(
35
  label="Name",
36
  info="Full name, including middle name. No special characters.",
37
+ placeholder="Tonic the Sesh Hog",
38
+ value="Tonic the Sesh Hog",
39
  interactive=True,
40
  )
41
 
 
95
  gr.JSON(
96
  value={"a": 1, "b": 2, "c": {"test": "a", "test2": [1, 2, 3]}}, label="JSON"
97
  )
98
+ gr.Label(value={"tonic1": 0.7, "tonic2": 0.2, "tonic3": 0.1})
99
  gr.File()
100
  with gr.Row():
101
  gr.ColorPicker()
 
119
 
120
  with gr.Row():
121
  with gr.Column(scale=2):
122
+ chatbot = gr.Chatbot([("Welcome to greenblast template", "I should check out darkmode!")], label="Chatbot")
123
  chat_btn = gr.Button("Add messages")
124
 
125
  def chat(history):
126
  time.sleep(2)
127
+ yield [["What's my name?", "Your name is Tonic!"]]
128
 
129
  chat_btn.click(
130
  lambda history: history
 
135
  )
136
  with gr.Column(scale=1):
137
  with gr.Accordion("Advanced Settings"):
138
+ gr.Markdown("Tonic")
139
  gr.Number(label="Chatbot control 1")
140
  gr.Number(label="Chatbot control 2")
141
  gr.Number(label="Chatbot control 3")