Rooni commited on
Commit
5f5f7cc
·
1 Parent(s): 90b0f48

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +15 -18
app.py CHANGED
@@ -45,26 +45,23 @@ footer {visibility: hidden !important;}
45
 
46
  # ui
47
  with gr.Blocks(css=css) as vui:
48
- with gr.Tabs() as tabs:
49
  with gr.Row():
50
- with gr.Column():
51
- with gr.Tab("Запрос", id='request v'):
52
- with gr.Row():
53
- with gr.Column(scale=3):
54
- promt = gr.Textbox(show_label=True, label="Запрос", lines=3)
55
- with gr.Tab("Настройки", id='settingsv'):
56
- with gr.Row():
57
- with gr.Column(scale=3):
58
- with gr.Row():
59
- model = gr.Radio(show_label=True, label="Модель", interactive=True, choices=["gpt-3.5-turbo", "gpt-3.5-turbo-16k", "gpt-3.5-turbo-16k-0613", "gpt-4"], value="gpt-4")
60
- with gr.Row():
61
- max_tokens = gr.Slider(show_label=True, label="Максимальное количество токенов", minimum=100, maximum=15000, value=5000, step=1)
62
- with gr.Column():
63
- text_button = gr.Button("Генерация", variant='primary', elem_id="generate")
64
- with gr.Column(scale=2):
65
- text_output = gr.Textbox(show_label=False, placeholder="Здравствуйте! Чем я могу Вам помочь сегодня?")
66
 
67
- text_button.click(generate, inputs=[promt, model, max_tokens], outputs=text_output)
68
 
69
  #end
70
  vui.queue(api_open=False).launch()
 
45
 
46
  # ui
47
  with gr.Blocks(css=css) as vui:
48
+ with gr.Tab("Запрос", id='request v'):
49
  with gr.Row():
50
+ with gr.Column(scale=3):
51
+ promt = gr.Textbox(show_label=True, label="Запрос", lines=3)
52
+ with gr.Tab("Настройки", id='settingsv'):
53
+ with gr.Row():
54
+ with gr.Column(scale=3):
55
+ with gr.Row():
56
+ model = gr.Radio(show_label=True, label="Модель", interactive=True, choices=["gpt-3.5-turbo", "gpt-3.5-turbo-16k", "gpt-3.5-turbo-16k-0613", "gpt-4"], value="gpt-4")
57
+ with gr.Row():
58
+ max_tokens = gr.Slider(show_label=True, label="Максимальное количество токенов", minimum=100, maximum=15000, value=5000, step=1)
59
+ with gr.Column():
60
+ text_button = gr.Button("Генерация", variant='primary', elem_id="generate")
61
+ with gr.Column(scale=2):
62
+ text_output = gr.Textbox(show_label=False, placeholder="Здравствуйте! Чем я могу Вам помочь сегодня?")
 
 
 
63
 
64
+ text_button.click(generate, inputs=[promt, model, max_tokens], outputs=text_output)
65
 
66
  #end
67
  vui.queue(api_open=False).launch()