zelk12 commited on
Commit
d21d723
·
verified ·
1 Parent(s): 24fca26

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +37 -21
app.py CHANGED
@@ -9,16 +9,21 @@ with gr.Blocks(theme=gr.themes.Soft(primary_hue="teal", secondary_hue="slate", n
9
  gr.HTML("""<a href="https://visitorbadge.io/status?path=https%3A%2F%2Fhuggingface.co%2Fspaces%2Fzelk12%2FChat_interface_test">
10
  <img src="https://api.visitorbadge.io/api/combined?path=https%3A%2F%2Fhuggingface.co%2Fspaces%2Fzelk12%2FChat_interface_test&countColor=%23263759" />
11
  </a>""")
12
-
13
- with gr.Row():
14
- gr.Textbox(
15
- label="API key",
16
- scale=4,
17
- )
18
- gr.Button(
19
- value="Apply",
20
- scale=1,
21
- )
 
 
 
 
 
22
 
23
  gr.ChatInterface(random_response,
24
  multimodal=True,
@@ -33,17 +38,28 @@ with gr.Blocks(theme=gr.themes.Soft(primary_hue="teal", secondary_hue="slate", n
33
  title="Chat interface test",
34
  save_history=True,
35
  )
36
- gr.Textbox(label="System instructions",)
37
- gr.Slider(label="temperature",
38
- minimum=0,
39
- maximum=2,
40
- value=0.95)
41
- gr.Slider(label="topP",
42
- minimum=0,
43
- maximum=1,
44
- value=0.5)
45
- gr.Slider(label="topK",
46
- value=100)
 
 
 
 
 
 
 
 
 
 
 
47
 
48
  if __name__ == "__main__":
49
  demo.launch()
 
9
  gr.HTML("""<a href="https://visitorbadge.io/status?path=https%3A%2F%2Fhuggingface.co%2Fspaces%2Fzelk12%2FChat_interface_test">
10
  <img src="https://api.visitorbadge.io/api/combined?path=https%3A%2F%2Fhuggingface.co%2Fspaces%2Fzelk12%2FChat_interface_test&countColor=%23263759" />
11
  </a>""")
12
+
13
+ with gr.Accordion(
14
+ "API",
15
+ open=False,
16
+ ):
17
+ with gr.Row():
18
+ gr.Textbox(
19
+ label="API key",
20
+ scale=4,
21
+ )
22
+ gr.Button(
23
+ value="Apply",
24
+ scale=1,
25
+ )
26
+ gr.Dropdown(label="Choose provider")
27
 
28
  gr.ChatInterface(random_response,
29
  multimodal=True,
 
38
  title="Chat interface test",
39
  save_history=True,
40
  )
41
+ with gr.Accordion(
42
+ "Settings",
43
+ open=False,
44
+ ):
45
+ gr.Dropdown(label="Choose model")
46
+ gr.Textbox(label="System instructions",)
47
+ gr.Slider(label="temperature",
48
+ interactive=True,
49
+ minimum=0,
50
+ maximum=2,
51
+ value=0.95)
52
+ gr.Slider(label="topP",
53
+ interactive=True,
54
+ minimum=0,
55
+ maximum=1,
56
+ value=0.5)
57
+ gr.Slider(label="topK",
58
+ interactive=True,
59
+ value=100)
60
+ gr.Checkbox(
61
+ label="Enable output stream"
62
+ )
63
 
64
  if __name__ == "__main__":
65
  demo.launch()