Spaces:
Sleeping
Sleeping
Rowan Martnishn
commited on
Update app.py
Browse files
app.py
CHANGED
@@ -259,13 +259,22 @@ thread.start()
|
|
259 |
|
260 |
# Gradio Interface
|
261 |
if prediction_plot_base64:
|
262 |
-
html_content =
|
|
|
|
|
|
|
|
|
263 |
else:
|
264 |
html_content = "Processing data..."
|
265 |
|
266 |
-
|
267 |
-
|
268 |
-
|
|
|
|
|
|
|
|
|
|
|
269 |
gr.HTML(value=html_content)
|
270 |
|
271 |
demo.launch()
|
|
|
259 |
|
260 |
# Gradio Interface
|
261 |
if prediction_plot_base64:
|
262 |
+
html_content = (
|
263 |
+
f'<img src="data:image/png;base64,{prediction_plot_base64}" '
|
264 |
+
'alt="Prediction Plot" '
|
265 |
+
'style="width: 100vw; height: 100vh; object-fit: contain;">'
|
266 |
+
)
|
267 |
else:
|
268 |
html_content = "Processing data..."
|
269 |
|
270 |
+
custom_css = """
|
271 |
+
body, .gradio-container {
|
272 |
+
margin: 0;
|
273 |
+
padding: 0;
|
274 |
+
}
|
275 |
+
"""
|
276 |
+
|
277 |
+
with gr.Blocks(css=custom_css) as demo:
|
278 |
gr.HTML(value=html_content)
|
279 |
|
280 |
demo.launch()
|