Nymbo commited on
Commit
68682a3
·
verified ·
1 Parent(s): 5216cd1

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +9 -14
app.py CHANGED
@@ -4,14 +4,6 @@ import gradio as gr
4
  from openai import OpenAI
5
  import os
6
 
7
- css = '''
8
- .gradio-container{max-width: 1000px !important}
9
- h1{text-align:center}
10
- footer {
11
- visibility: hidden
12
- }
13
- '''
14
-
15
  PASS = os.getenv("HF_TOKEN")
16
 
17
  client = OpenAI(
@@ -52,24 +44,27 @@ def respond(
52
  response += token
53
  yield response
54
 
 
 
55
  demo = gr.ChatInterface(
56
  respond,
57
  additional_inputs=[
58
- gr.Textbox(value="", label="System message", visible=False),
59
- gr.Slider(minimum=1, maximum=2048, value=512, step=1, label="Max new tokens", visible=False),
60
- gr.Slider(minimum=0.1, maximum=4.0, value=0.7, step=0.1, label="Temperature", visible=False),
61
  gr.Slider(
62
  minimum=0.1,
63
  maximum=1.0,
64
  value=0.95,
65
  step=0.05,
66
  label="Top-P",
67
- visible=False,
68
  ),
69
 
70
  ],
71
- css=css,
72
- theme = "Nymbo/Nymbo_Theme",
 
73
  )
74
  if __name__ == "__main__":
75
  demo.launch()
 
4
  from openai import OpenAI
5
  import os
6
 
 
 
 
 
 
 
 
 
7
  PASS = os.getenv("HF_TOKEN")
8
 
9
  client = OpenAI(
 
44
  response += token
45
  yield response
46
 
47
+ chatbot = gr.Chatbot(height=600)
48
+
49
  demo = gr.ChatInterface(
50
  respond,
51
  additional_inputs=[
52
+ gr.Textbox(value="", label="System message", visible=True),
53
+ gr.Slider(minimum=1, maximum=2048, value=512, step=1, label="Max new tokens", visible=True),
54
+ gr.Slider(minimum=0.1, maximum=4.0, value=0.7, step=0.1, label="Temperature", visible=True),
55
  gr.Slider(
56
  minimum=0.1,
57
  maximum=1.0,
58
  value=0.95,
59
  step=0.05,
60
  label="Top-P",
61
+ visible=True,
62
  ),
63
 
64
  ],
65
+ fill_height=True,
66
+ chatbot=chatbot,
67
+ theme = "Nymbo/Alyx_Theme",
68
  )
69
  if __name__ == "__main__":
70
  demo.launch()