Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
@@ -417,7 +417,7 @@ def mm(graph,zoom):
|
|
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="
|
421 |
return out_html
|
422 |
|
423 |
def summarize(inp,history,data=None,files=None,directory=None,url=None,pdf_url=None,pdf_batch=None):
|
@@ -559,7 +559,7 @@ with gr.Blocks() as app:
|
|
559 |
with gr.Tab("PDF Batch"):
|
560 |
pdf_batch = gr.Textbox(label="PDF URL Batch (comma separated)")
|
561 |
m_box=gr.HTML()
|
562 |
-
zoom_btn=gr.Slider(label="Zoom",step=0.01,minimum=0.1,maximum=
|
563 |
e_box=gr.Textbox(interactive=True)
|
564 |
upd_button=gr.Button("Update Chart")
|
565 |
json_out=gr.JSON()
|
|
|
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):
|
|
|
559 |
with gr.Tab("PDF Batch"):
|
560 |
pdf_batch = gr.Textbox(label="PDF URL Batch (comma separated)")
|
561 |
m_box=gr.HTML()
|
562 |
+
zoom_btn=gr.Slider(label="Zoom",step=0.01,minimum=0.1,maximum=20,value=1,interactive=True)
|
563 |
e_box=gr.Textbox(interactive=True)
|
564 |
upd_button=gr.Button("Update Chart")
|
565 |
json_out=gr.JSON()
|