Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -11,7 +11,7 @@ def generate(description, model, max_tokens):
|
|
11 |
}
|
12 |
|
13 |
payload = {
|
14 |
-
'messages': [{'role': 'system', 'content':
|
15 |
'max_tokens': max_tokens,
|
16 |
'model': model
|
17 |
}
|
@@ -33,7 +33,7 @@ def generate(description, model, max_tokens):
|
|
33 |
|
34 |
iface = gr.Interface(fn=generate, inputs=[
|
35 |
gr.Textbox(label="Запрос"),
|
36 |
-
gr.Radio(show_label=True, label="Модель", interactive=True, choices=["gpt-3.5-turbo", "gpt-3.5-turbo-16k"
|
37 |
gr.Slider(show_label=True, label="Максимум токенов", minimum=100, maximum=15000, value=10000, step=1)
|
38 |
-
], outputs=gr.Textbox(label="Ответ")
|
39 |
iface.launch()
|
|
|
11 |
}
|
12 |
|
13 |
payload = {
|
14 |
+
'messages': [{'role': 'system', 'content': description}],
|
15 |
'max_tokens': max_tokens,
|
16 |
'model': model
|
17 |
}
|
|
|
33 |
|
34 |
iface = gr.Interface(fn=generate, inputs=[
|
35 |
gr.Textbox(label="Запрос"),
|
36 |
+
gr.Radio(show_label=True, label="Модель", interactive=True, choices=["gpt-3.5-turbo", "gpt-3.5-turbo-16k"], value="gpt-3.5-turbo"),
|
37 |
gr.Slider(show_label=True, label="Максимум токенов", minimum=100, maximum=15000, value=10000, step=1)
|
38 |
+
], outputs=gr.Textbox(label="Ответ"))
|
39 |
iface.launch()
|