Rowan Martnishn commited on
Commit
a2effd4
·
verified ·
1 Parent(s): 5adb75c

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +13 -4
app.py CHANGED
@@ -259,13 +259,22 @@ thread.start()
259
 
260
  # Gradio Interface
261
  if prediction_plot_base64:
262
- html_content = f'<img src="data:image/png;base64,{prediction_plot_base64}" alt="Prediction Plot">'
 
 
 
 
263
  else:
264
  html_content = "Processing data..."
265
 
266
- # iface = gr.Interface(fn=None, inputs=None, outputs=gr.HTML(value=html_content))
267
- # iface.launch()
268
- with gr.Blocks() as demo:
 
 
 
 
 
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()