Omnibus commited on
Commit
6aefd1f
·
verified ·
1 Parent(s): 53fb5d8

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +9 -3
app.py CHANGED
@@ -510,11 +510,15 @@ def clear_fn():
510
 
511
 
512
  css="""
513
- #wrap { width: 100%; height: 100%; padding: 0; overflow: hidden; }
514
- #frame { width: 800px; height: 800px; border: 1px solid black; }
515
  #frame { zoom: $ZOOM; -moz-transform: scale($ZOOM); -moz-transform-origin: 0 0; }
516
  """
517
  this=["1.25"]
 
 
 
 
518
 
519
  with gr.Blocks(css=css.replace("$ZOOM",this[0])) as app:
520
  gr.HTML("""<center><h1>Mixtral 8x7B TLDR Summarizer + Web</h1><h3>Summarize Data of unlimited length</h3>""")
@@ -523,6 +527,7 @@ with gr.Blocks(css=css.replace("$ZOOM",this[0])) as app:
523
  with gr.Column(scale=3):
524
  prompt=gr.Textbox(label = "Instructions (optional)")
525
  with gr.Column(scale=1):
 
526
  button=gr.Button()
527
 
528
  #models_dd=gr.Dropdown(choices=[m for m in return_list],interactive=True)
@@ -543,12 +548,13 @@ with gr.Blocks(css=css.replace("$ZOOM",this[0])) as app:
543
  with gr.Tab("PDF Batch"):
544
  pdf_batch = gr.Textbox(label="PDF URL Batch (comma separated)")
545
  m_box=gr.HTML()
546
-
547
  e_box=gr.Textbox(interactive=True)
548
  upd_button=gr.Button("Update Chart")
549
  json_out=gr.JSON()
550
  #text=gr.JSON()
551
 
 
552
  upd_button.click(mm,e_box,m_box)
553
  #inp_query.change(search_models,inp_query,models_dd)
554
  clear_btn.click(clear_fn,None,[prompt,chatbot])
 
510
 
511
 
512
  css="""
513
+ #wrap { width: 100%; height: 100%; padding: 0; overflow: auto; }
514
+ #frame { width: 100%; border: 1px solid black; }
515
  #frame { zoom: $ZOOM; -moz-transform: scale($ZOOM); -moz-transform-origin: 0 0; }
516
  """
517
  this=["1.25"]
518
+ def zoom_update(inp):
519
+ this.clear()
520
+ this.update(inp)
521
+
522
 
523
  with gr.Blocks(css=css.replace("$ZOOM",this[0])) as app:
524
  gr.HTML("""<center><h1>Mixtral 8x7B TLDR Summarizer + Web</h1><h3>Summarize Data of unlimited length</h3>""")
 
527
  with gr.Column(scale=3):
528
  prompt=gr.Textbox(label = "Instructions (optional)")
529
  with gr.Column(scale=1):
530
+
531
  button=gr.Button()
532
 
533
  #models_dd=gr.Dropdown(choices=[m for m in return_list],interactive=True)
 
548
  with gr.Tab("PDF Batch"):
549
  pdf_batch = gr.Textbox(label="PDF URL Batch (comma separated)")
550
  m_box=gr.HTML()
551
+ zoom_btn=gr.Slider(label="Zoom",step=0.01,minimum=0.1,maximum=5,value=1,interactive=True)
552
  e_box=gr.Textbox(interactive=True)
553
  upd_button=gr.Button("Update Chart")
554
  json_out=gr.JSON()
555
  #text=gr.JSON()
556
 
557
+ zoom_btn.change(zoom_update,zoom_btn,None)
558
  upd_button.click(mm,e_box,m_box)
559
  #inp_query.change(search_models,inp_query,models_dd)
560
  clear_btn.click(clear_fn,None,[prompt,chatbot])