aixsatoshi commited on
Commit
cfa5ed1
1 Parent(s): b81c410

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +28 -17
app.py CHANGED
@@ -138,25 +138,28 @@ templates = [
138
  "B22", "LLAMA_3", "PHI_3"
139
  ]
140
 
141
- demo = gr.ChatInterface(
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
142
  respond,
143
  additional_inputs=[
144
- gr.Dropdown([
145
- 'Oumuamua-7b-RP_Q4_K_M.gguf',
146
- 'Oumuamua-7b-instruct-v2-Q4_K_M.gguf',
147
- 'umiyuki-Umievo-itr012-Gleipnir-7B-Q4_K_M.gguf',
148
- 'Ninja-V3-Q4_K_M.gguf',
149
- 'kagemusya-7b-v1Q8_0.gguf',
150
- 'Llama-3-ELYZA-JP-8B-q4_k_m.gguf'
151
- ],
152
- value="Oumuamua-7b-RP_Q4_K_M.gguf",
153
- label="Model"
154
- ),
155
- gr.Dropdown(
156
- choices=templates,
157
- value="LLAMA_2",
158
- label="Template"
159
- ),
160
  gr.Textbox(value="You are a helpful assistant.", label="System message"),
161
  gr.Slider(minimum=1, maximum=4096, value=2048, step=1, label="Max tokens"),
162
  gr.Slider(minimum=0.1, maximum=4.0, value=0.7, step=0.1, label="Temperature"),
@@ -195,6 +198,14 @@ demo = gr.ChatInterface(
195
  )
196
  )
197
 
 
 
 
 
 
 
 
198
 
199
  if __name__ == "__main__":
200
  demo.launch()
 
 
138
  "B22", "LLAMA_3", "PHI_3"
139
  ]
140
 
141
+ model_dropdown = gr.Dropdown(
142
+ choices=[
143
+ 'Oumuamua-7b-RP_Q4_K_M.gguf',
144
+ 'Oumuamua-7b-instruct-v2-Q4_K_M.gguf',
145
+ 'umiyuki-Umievo-itr012-Gleipnir-7B-Q4_K_M.gguf',
146
+ 'Ninja-V3-Q4_K_M.gguf',
147
+ 'kagemusya-7b-v1Q8_0.gguf',
148
+ 'Llama-3-ELYZA-JP-8B-q4_k_m.gguf'
149
+ ],
150
+ value="Oumuamua-7b-RP_Q4_K_M.gguf",
151
+ label="Model"
152
+ )
153
+
154
+ template_dropdown = gr.Dropdown(
155
+ choices=templates,
156
+ value="LLAMA_3",
157
+ label="Template"
158
+ )
159
+
160
+ chat_interface = gr.ChatInterface(
161
  respond,
162
  additional_inputs=[
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
163
  gr.Textbox(value="You are a helpful assistant.", label="System message"),
164
  gr.Slider(minimum=1, maximum=4096, value=2048, step=1, label="Max tokens"),
165
  gr.Slider(minimum=0.1, maximum=4.0, value=0.7, step=0.1, label="Temperature"),
 
198
  )
199
  )
200
 
201
+ demo = gr.Blocks()
202
+
203
+ with demo:
204
+ gr.Markdown(description)
205
+ model_dropdown.render()
206
+ template_dropdown.render()
207
+ chat_interface.render()
208
 
209
  if __name__ == "__main__":
210
  demo.launch()
211
+