Spaces:
Running on Zero
Running on Zero
Show pdf-only upload hint
Browse files
app.py
CHANGED
|
@@ -185,6 +185,7 @@ def upload_state(uploaded_file: str | None) -> tuple[Any, Any]:
|
|
| 185 |
if not uploaded_file:
|
| 186 |
return (
|
| 187 |
gr.update(visible=True),
|
|
|
|
| 188 |
gr.update(visible=False, value=selected_document_html()),
|
| 189 |
workflow_phase_html("ready"),
|
| 190 |
)
|
|
@@ -193,6 +194,7 @@ def upload_state(uploaded_file: str | None) -> tuple[Any, Any]:
|
|
| 193 |
preview_data_url = _uploaded_file_preview_data_url(uploaded_file)
|
| 194 |
return (
|
| 195 |
gr.update(visible=False),
|
|
|
|
| 196 |
gr.update(visible=True, value=selected_document_html(filename, preview_data_url)),
|
| 197 |
workflow_phase_html("processing"),
|
| 198 |
)
|
|
@@ -3204,7 +3206,7 @@ with gr.Blocks(title="Blood Test Explainer") as demo:
|
|
| 3204 |
with gr.Column(scale=4, min_width=320, elem_classes=["bte-workflow-panel", "bte-panel-upload"]):
|
| 3205 |
with gr.Group(elem_classes=["bte-shell", "bte-upload-card"]):
|
| 3206 |
gr.HTML(
|
| 3207 |
-
'<p class="bte-upload-hint">Supported formats: PDF
|
| 3208 |
elem_classes=["bte-upload-hint-wrap"],
|
| 3209 |
)
|
| 3210 |
with gr.Group() as upload_dropzone:
|
|
|
|
| 185 |
if not uploaded_file:
|
| 186 |
return (
|
| 187 |
gr.update(visible=True),
|
| 188 |
+
gr.update(value='<p class="bte-upload-hint">Supported formats: PDF</p>', visible=True),
|
| 189 |
gr.update(visible=False, value=selected_document_html()),
|
| 190 |
workflow_phase_html("ready"),
|
| 191 |
)
|
|
|
|
| 194 |
preview_data_url = _uploaded_file_preview_data_url(uploaded_file)
|
| 195 |
return (
|
| 196 |
gr.update(visible=False),
|
| 197 |
+
gr.update(value="", visible=False),
|
| 198 |
gr.update(visible=True, value=selected_document_html(filename, preview_data_url)),
|
| 199 |
workflow_phase_html("processing"),
|
| 200 |
)
|
|
|
|
| 3206 |
with gr.Column(scale=4, min_width=320, elem_classes=["bte-workflow-panel", "bte-panel-upload"]):
|
| 3207 |
with gr.Group(elem_classes=["bte-shell", "bte-upload-card"]):
|
| 3208 |
gr.HTML(
|
| 3209 |
+
'<p class="bte-upload-hint">Supported formats: PDF</p>',
|
| 3210 |
elem_classes=["bte-upload-hint-wrap"],
|
| 3211 |
)
|
| 3212 |
with gr.Group() as upload_dropzone:
|