SnJForever commited on
Commit
b6c498d
β€’
1 Parent(s): 19b9924
Files changed (1) hide show
  1. app.py +10 -8
app.py CHANGED
@@ -313,14 +313,6 @@ with gr.Blocks(css=css) as demo:
313
  audio_html = gr.HTML(htm_audio)
314
  with gr.Column(scale=6):
315
  chatbot = gr.Chatbot(elem_id="chatbox")
316
- with gr.Row():
317
- with gr.Column(scale=2, min_width=0):
318
- type_select = gr.Dropdown(show_label=False, choices= ["TEXT", "IMAGE"],value="TEXT",interactive=True)
319
- with gr.Column(scale=8):
320
- input_message = gr.Textbox(show_label=False, placeholder="Enter text and press enter", visible=True).style(container=False)
321
- btn_submit = gr.Button("Submit")
322
- total_tokens_str = gr.Markdown(elem_id="total_tokens_str")
323
- btn_clear_conversation = gr.Button("πŸ”ƒ Start New Conversation")
324
  with gr.Column(scale=3):
325
  gr.Markdown("Enter your OpenAI API Key. You can get one [here](https://platform.openai.com/account/api-keys).", elem_id="label")
326
  user_token = gr.Textbox(value='', placeholder="OpenAI API Key", type="password", show_label=False)
@@ -330,6 +322,16 @@ with gr.Blocks(css=css) as demo:
330
  temperature = gr.Slider(minimum=0, maximum=2.0, value=0.7, step=0.1, label="Temperature", info="Higher = more creative/chaotic")
331
  max_tokens = gr.Slider(minimum=100, maximum=4096, value=1000, step=1, label="Max tokens per response")
332
  context_length = gr.Slider(minimum=1, maximum=10, value=2, step=1, label="Context length", info="Number of previous messages to send to the chatbot. Be careful with high values, it can blow up the token budget quickly.")
 
 
 
 
 
 
 
 
 
 
333
  # with gr.Row():
334
  # audio_comp = gr.Microphone(source="microphone", type="filepath", label="Just say it!",
335
  # interactive=True, streaming=False)
 
313
  audio_html = gr.HTML(htm_audio)
314
  with gr.Column(scale=6):
315
  chatbot = gr.Chatbot(elem_id="chatbox")
 
 
 
 
 
 
 
 
316
  with gr.Column(scale=3):
317
  gr.Markdown("Enter your OpenAI API Key. You can get one [here](https://platform.openai.com/account/api-keys).", elem_id="label")
318
  user_token = gr.Textbox(value='', placeholder="OpenAI API Key", type="password", show_label=False)
 
322
  temperature = gr.Slider(minimum=0, maximum=2.0, value=0.7, step=0.1, label="Temperature", info="Higher = more creative/chaotic")
323
  max_tokens = gr.Slider(minimum=100, maximum=4096, value=1000, step=1, label="Max tokens per response")
324
  context_length = gr.Slider(minimum=1, maximum=10, value=2, step=1, label="Context length", info="Number of previous messages to send to the chatbot. Be careful with high values, it can blow up the token budget quickly.")
325
+ with gr.Row():
326
+ with gr.Column(scale=2, min_width=0):
327
+ type_select = gr.Dropdown(show_label=False, choices= ["TEXT", "IMAGE"],value="TEXT",interactive=True)
328
+ with gr.Column(scale=8):
329
+ input_message = gr.Textbox(show_label=False, placeholder="Enter text and press enter", visible=True).style(container=False)
330
+ with gr.Column(scale=8):
331
+ btn_submit = gr.Button("Submit")
332
+ total_tokens_str = gr.Markdown(elem_id="total_tokens_str")
333
+ with gr.Row():
334
+ btn_clear_conversation = gr.Button("πŸ”ƒ Start New Conversation")
335
  # with gr.Row():
336
  # audio_comp = gr.Microphone(source="microphone", type="filepath", label="Just say it!",
337
  # interactive=True, streaming=False)