Omnibus commited on
Commit
e9e3c58
1 Parent(s): c17440a

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -8
app.py CHANGED
@@ -405,19 +405,13 @@ css="""
405
 
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=f'''<div id="wrap" style="width: 100%; height: 100%; padding: 0; overflow: auto;"><iframe id="frame" src="https://omnibus-mermaid-script.static.hf.space/index.html?mermaid={code_out}" style="border: 1px solid black; zoom: {str(zoom)}; -moz-transform: scale({str(zoom)}); -moz-transform-origin: 0 0;"></iframe></div>'''
421
  return out_html
422
 
423
  def summarize(inp,history,data=None,files=None,directory=None,url=None,pdf_url=None,pdf_batch=None):
 
405
 
406
 
407
  def mm(graph,zoom):
408
+
 
 
 
 
 
 
409
  code_out=""
410
  for ea in graph.split("\n"):
411
  code=ea.strip().strip("\n")
412
  code_out+=code
413
  #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>'''
414
+ out_html=f'''<div id="wrap" style="width: 100%; height: 100%;max-height:600px; padding: 0; overflow: auto;"><iframe id="frame" src="https://omnibus-mermaid-script.static.hf.space/index.html?mermaid={code_out}" style="border: 1px solid black; zoom: {str(zoom)}; -moz-transform: scale({str(zoom)}); -moz-transform-origin: 0 0;"></iframe></div>'''
415
  return out_html
416
 
417
  def summarize(inp,history,data=None,files=None,directory=None,url=None,pdf_url=None,pdf_batch=None):