Janec09 commited on
Commit
904795b
·
verified ·
1 Parent(s): 0a8c18b

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +29 -1
app.py CHANGED
@@ -148,8 +148,36 @@ print(top_results)
148
  #ChatInterface requires at least one parameter(a function)
149
  chatbot = gr.ChatInterface(respond,type="messages", title="Accessible Intelligence Hub", theme="Taithrah/Minimal")
150
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
151
  #launching chatbot
152
- chatbot.launch()
153
 
154
 
155
  #You may run into errors when you're trying different models. To see the error messages, set debug to True in launch()
 
148
  #ChatInterface requires at least one parameter(a function)
149
  chatbot = gr.ChatInterface(respond,type="messages", title="Accessible Intelligence Hub", theme="Taithrah/Minimal")
150
 
151
+ with gr.Blocks(
152
+ theme=gr.themes.Soft(
153
+ primary_hue="purple",
154
+ secondary_hue="fuchsia",
155
+ neutral_hue="gray",
156
+ text_size="lg"
157
+ ).set(
158
+ background_fill_primary='*neutral_200',
159
+ background_fill_secondary='*neutral_400',
160
+ background_fill_secondary_dark='*secondary_500',
161
+ border_color_accent='*secondary_400',
162
+ border_color_accent_dark='*secondary_800',
163
+ color_accent='*secondary_300',
164
+ color_accent_soft='*secondary_500',
165
+ color_accent_soft_dark='*secondary_400',
166
+ button_primary_background_fill='*secondary_500',
167
+ button_primary_background_fill_dark='*secondary_600'
168
+ )
169
+ ) as demo: # This is the correct place for 'as demo'
170
+
171
+ chatbot = gr.ChatInterface(
172
+ fn=magic_8_ball,
173
+ title="Magic 8 Ball",
174
+ description="Let's play magic 8 ball!",
175
+ type="messages"
176
+ )
177
+
178
+
179
  #launching chatbot
180
+ demo.launch()
181
 
182
 
183
  #You may run into errors when you're trying different models. To see the error messages, set debug to True in launch()