Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
|
@@ -41,7 +41,7 @@ def ask_openai_with_image(instruction, image, low):
|
|
| 41 |
"type": "image_url",
|
| 42 |
"image_url": {
|
| 43 |
"url": f"data:image/jpeg;base64,{base64_image}",
|
| 44 |
-
"detail": "
|
| 45 |
},
|
| 46 |
},
|
| 47 |
],
|
|
@@ -105,13 +105,12 @@ with gr.Blocks(css=css) as demo:
|
|
| 105 |
instructions = gr.Textbox(label="Дополнительный ввод", lines=3)
|
| 106 |
image_input = gr.Image(label="Фото задания", type="pil")
|
| 107 |
submit_button = gr.Button("Решить")
|
| 108 |
-
low = gr.Checkbox(label="Low режим")
|
| 109 |
with gr.Column():
|
| 110 |
output_markdown = gr.Markdown(label="AI Response")
|
| 111 |
|
| 112 |
submit_button.click(
|
| 113 |
fn=ask_openai_with_image,
|
| 114 |
-
inputs=[instructions, image_input
|
| 115 |
outputs=[output_markdown]
|
| 116 |
)
|
| 117 |
|
|
|
|
| 41 |
"type": "image_url",
|
| 42 |
"image_url": {
|
| 43 |
"url": f"data:image/jpeg;base64,{base64_image}",
|
| 44 |
+
"detail": "high",
|
| 45 |
},
|
| 46 |
},
|
| 47 |
],
|
|
|
|
| 105 |
instructions = gr.Textbox(label="Дополнительный ввод", lines=3)
|
| 106 |
image_input = gr.Image(label="Фото задания", type="pil")
|
| 107 |
submit_button = gr.Button("Решить")
|
|
|
|
| 108 |
with gr.Column():
|
| 109 |
output_markdown = gr.Markdown(label="AI Response")
|
| 110 |
|
| 111 |
submit_button.click(
|
| 112 |
fn=ask_openai_with_image,
|
| 113 |
+
inputs=[instructions, image_input],
|
| 114 |
outputs=[output_markdown]
|
| 115 |
)
|
| 116 |
|