Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -401,7 +401,7 @@ def mm(graph):
|
|
401 |
code=ea.strip().strip("\n")
|
402 |
code_out+=code
|
403 |
#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>'''
|
404 |
-
out_html=f'''<div><iframe src="https://omnibus-mermaid-script.static.hf.space/index.html?mermaid={code_out}" height="500" width="500"></iframe></div>'''
|
405 |
return out_html
|
406 |
|
407 |
def summarize(inp,history,data=None,files=None,directory=None,url=None,pdf_url=None,pdf_batch=None):
|
@@ -487,6 +487,8 @@ def summarize(inp,history,data=None,files=None,directory=None,url=None,pdf_url=N
|
|
487 |
if "```" in chart_list[ii]:
|
488 |
while True:
|
489 |
line_out+=chart_list[ii+cnti].strip().strip("\n").replace('"',"")
|
|
|
|
|
490 |
line_out+="\n"
|
491 |
cnti+=1
|
492 |
if "```" in chart_list[ii+cnti]:
|
@@ -506,6 +508,14 @@ def summarize(inp,history,data=None,files=None,directory=None,url=None,pdf_url=N
|
|
506 |
def clear_fn():
|
507 |
return "",[(None,None)]
|
508 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
509 |
with gr.Blocks() as app:
|
510 |
gr.HTML("""<center><h1>Mixtral 8x7B TLDR Summarizer + Web</h1><h3>Summarize Data of unlimited length</h3>""")
|
511 |
chatbot = gr.Chatbot(label="Mixtral 8x7B Chatbot",show_copy_button=True)
|
|
|
401 |
code=ea.strip().strip("\n")
|
402 |
code_out+=code
|
403 |
#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>'''
|
404 |
+
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>'''
|
405 |
return out_html
|
406 |
|
407 |
def summarize(inp,history,data=None,files=None,directory=None,url=None,pdf_url=None,pdf_batch=None):
|
|
|
487 |
if "```" in chart_list[ii]:
|
488 |
while True:
|
489 |
line_out+=chart_list[ii+cnti].strip().strip("\n").replace('"',"")
|
490 |
+
if not line_out.endswith(";"):
|
491 |
+
line_out+=";"
|
492 |
line_out+="\n"
|
493 |
cnti+=1
|
494 |
if "```" in chart_list[ii+cnti]:
|
|
|
508 |
def clear_fn():
|
509 |
return "",[(None,None)]
|
510 |
|
511 |
+
|
512 |
+
css="""
|
513 |
+
#wrap { width: 600px; height: 390px; padding: 0; overflow: hidden; }
|
514 |
+
#frame { width: 800px; height: 520px; border: 1px solid black; }
|
515 |
+
#frame { zoom: 0.75; -moz-transform: scale(0.75); -moz-transform-origin: 0 0; }
|
516 |
+
"""
|
517 |
+
|
518 |
+
|
519 |
with gr.Blocks() as app:
|
520 |
gr.HTML("""<center><h1>Mixtral 8x7B TLDR Summarizer + Web</h1><h3>Summarize Data of unlimited length</h3>""")
|
521 |
chatbot = gr.Chatbot(label="Mixtral 8x7B Chatbot",show_copy_button=True)
|