Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
@@ -406,17 +406,18 @@ css="""
|
|
406 |
|
407 |
def mm(graph,zoom):
|
408 |
css="""
|
409 |
-
#wrap { width: 100%; height: 100%; padding: 0; overflow: auto; }
|
410 |
-
#frame { width: 100%; border: 1px solid black; }
|
411 |
-
#frame { zoom: $ZOOM; -moz-transform: scale($ZOOM); -moz-transform-origin: 0 0; }
|
412 |
"""
|
413 |
css=css.replace("$ZOOM",str(zoom))
|
414 |
-
|
|
|
415 |
for ea in graph.split("\n"):
|
416 |
code=ea.strip().strip("\n")
|
417 |
code_out+=code
|
418 |
#out_html=f'''<div><iframe src="https://omnibus-mermaid-script.static.hf.space/index.html?mermaid={code_out}&rand={random.randint(1,1111111111)}" height="500" width="500"></iframe></div>'''
|
419 |
-
out_html=f'''<div id="wrap"><iframe id="frame" src="https://omnibus-mermaid-script.static.hf.space/index.html?mermaid={code_out}" height="500" width="500"></iframe></div>'''
|
420 |
return gr.update(out_html)
|
421 |
|
422 |
def summarize(inp,history,data=None,files=None,directory=None,url=None,pdf_url=None,pdf_batch=None):
|
|
|
406 |
|
407 |
def mm(graph,zoom):
|
408 |
css="""
|
409 |
+
#wrap { width: 100%; height: 100%; padding: 0; overflow: auto; }
|
410 |
+
#frame { width: 100%; border: 1px solid black; }
|
411 |
+
#frame { zoom: $ZOOM; -moz-transform: scale($ZOOM); -moz-transform-origin: 0 0; }
|
412 |
"""
|
413 |
css=css.replace("$ZOOM",str(zoom))
|
414 |
+
out_html=f"<style>{css}</style>"
|
415 |
+
code_out=""
|
416 |
for ea in graph.split("\n"):
|
417 |
code=ea.strip().strip("\n")
|
418 |
code_out+=code
|
419 |
#out_html=f'''<div><iframe src="https://omnibus-mermaid-script.static.hf.space/index.html?mermaid={code_out}&rand={random.randint(1,1111111111)}" height="500" width="500"></iframe></div>'''
|
420 |
+
out_html=out_html + f'''<div id="wrap"><iframe id="frame" src="https://omnibus-mermaid-script.static.hf.space/index.html?mermaid={code_out}" height="500" width="500"></iframe></div>'''
|
421 |
return gr.update(out_html)
|
422 |
|
423 |
def summarize(inp,history,data=None,files=None,directory=None,url=None,pdf_url=None,pdf_batch=None):
|