Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -97,17 +97,6 @@ def ask_openai_with_image(instruction, image, low):
|
|
97 |
return f"Error: {response.status_code} - {response.text}"
|
98 |
css = """
|
99 |
footer {visibility: hidden !important;}
|
100 |
-
pn {div.svelte-sfqy0y {
|
101 |
-
display: flex;
|
102 |
-
flex-direction: inherit;
|
103 |
-
flex-wrap: wrap;
|
104 |
-
gap: var(--form-gap-width);
|
105 |
-
box-shadow: var(--block-shadow);
|
106 |
-
border: var(--block-border-width) solid var(--border-color-primary);
|
107 |
-
border-radius: var(--block-radius);
|
108 |
-
background: var(--border-color-primary);
|
109 |
-
overflow-y: hidden;
|
110 |
-
}}
|
111 |
"""
|
112 |
# Создаем интерфейс с помощью Gradio
|
113 |
with gr.Blocks(css=css) as demo:
|
@@ -117,7 +106,7 @@ with gr.Blocks(css=css) as demo:
|
|
117 |
image_input = gr.Image(label="Фото задания", type="pil")
|
118 |
submit_button = gr.Button("Решить", variant='primary')
|
119 |
with gr.Column():
|
120 |
-
output_markdown = gr.Markdown(label="AI Response"
|
121 |
|
122 |
submit_button.click(
|
123 |
fn=ask_openai_with_image,
|
|
|
97 |
return f"Error: {response.status_code} - {response.text}"
|
98 |
css = """
|
99 |
footer {visibility: hidden !important;}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
100 |
"""
|
101 |
# Создаем интерфейс с помощью Gradio
|
102 |
with gr.Blocks(css=css) as demo:
|
|
|
106 |
image_input = gr.Image(label="Фото задания", type="pil")
|
107 |
submit_button = gr.Button("Решить", variant='primary')
|
108 |
with gr.Column():
|
109 |
+
output_markdown = gr.Markdown(label="AI Response")
|
110 |
|
111 |
submit_button.click(
|
112 |
fn=ask_openai_with_image,
|