nbroad commited on
Commit
eee7e28
·
verified ·
1 Parent(s): 82914f6

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +5 -1
app.py CHANGED
@@ -1,4 +1,4 @@
1
- # app.py
2
  from fastapi import FastAPI, Request, Form
3
  from fastapi.templating import Jinja2Templates
4
  from fastapi.responses import HTMLResponse
@@ -30,6 +30,10 @@ async def process_form(
30
  run_path = f"{entity}/{project}/runs/{run_id}"
31
  run = api.run(run_path)
32
  iframe_html = run.to_html()
 
 
 
 
33
  return templates.TemplateResponse(
34
  "index.html",
35
  {
 
1
+ import re
2
  from fastapi import FastAPI, Request, Form
3
  from fastapi.templating import Jinja2Templates
4
  from fastapi.responses import HTMLResponse
 
30
  run_path = f"{entity}/{project}/runs/{run_id}"
31
  run = api.run(run_path)
32
  iframe_html = run.to_html()
33
+
34
+ # Modify the iframe height to be 100%
35
+ iframe_html = re.sub(r'height:\d+px', 'height:100%', iframe_html)
36
+
37
  return templates.TemplateResponse(
38
  "index.html",
39
  {