Pittawat Taveekitworachai commited on
Commit
631e701
·
1 Parent(s): d746a50

chore: add theme

Browse files
Files changed (1) hide show
  1. demo.py +20 -1
demo.py CHANGED
@@ -19,6 +19,24 @@ processor = AutoProcessor.from_pretrained(
19
  model_name, min_pixels=min_pixels, max_pixels=max_pixels
20
  )
21
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
22
 
23
  def bot_streaming(message, history, max_new_tokens=512):
24
  txt = message["text"]
@@ -118,6 +136,7 @@ demo = gr.ChatInterface(
118
  stop_btn="Stop Generation",
119
  fill_height=True,
120
  multimodal=True,
 
121
  )
122
 
123
- demo.launch(debug=True)
 
19
  model_name, min_pixels=min_pixels, max_pixels=max_pixels
20
  )
21
 
22
+ theme = gr.themes.Soft(
23
+ primary_hue=gr.themes.Color(
24
+ c50="#f7f7fd",
25
+ c100="#dfdef8",
26
+ c200="#c4c1f2",
27
+ c300="#a29eea",
28
+ c400="#8f8ae6",
29
+ c500="#756fe0",
30
+ c600="#635cc1",
31
+ c700="#4f4a9b",
32
+ c800="#433f83",
33
+ c900="#302d5e",
34
+ c950="#302d5e",
35
+ ),
36
+ secondary_hue="rose",
37
+ neutral_hue="stone",
38
+ )
39
+
40
 
41
  def bot_streaming(message, history, max_new_tokens=512):
42
  txt = message["text"]
 
136
  stop_btn="Stop Generation",
137
  fill_height=True,
138
  multimodal=True,
139
+ theme=theme,
140
  )
141
 
142
+ demo.launch(ssr_mode=False)