Vartex39 commited on
Commit
10e3f9b
·
1 Parent(s): 55b9803

PDF yüklendiğinde sayfa aralığı girişleri aktifleşiyor

Browse files
Files changed (1) hide show
  1. ui.py +13 -3
ui.py CHANGED
@@ -43,9 +43,19 @@ with gr.Blocks() as demo:
43
 
44
  manual_input = gr.Textbox(lines=5, label="Metni Manuel Gir")
45
 
46
- with gr.Row():
47
- start_page = gr.Number(label="Başlangıç Sayfası", value=1, precision=0, interactive=False, visible=False)
48
- end_page = gr.Number(label="Bitiş Sayfası", value=5, precision=0, interactive=False, visible=False)
 
 
 
 
 
 
 
 
 
 
49
 
50
 
51
  def enable_page_inputs(pdf):
 
43
 
44
  manual_input = gr.Textbox(lines=5, label="Metni Manuel Gir")
45
 
46
+ with gr.Row(visible=False) as page_controls:
47
+ start_page = gr.Number(label="Başlangıç Sayfası", value=1, precision=0)
48
+ end_page = gr.Number(label="Bitiş Sayfası", value=5, precision=0)
49
+
50
+ def show_page_controls(pdf):
51
+ return gr.update(visible=True)
52
+
53
+ pdf_input.change(
54
+ fn=show_page_controls,
55
+ inputs=[pdf_input],
56
+ outputs=[page_controls]
57
+ )
58
+
59
 
60
 
61
  def enable_page_inputs(pdf):