Spaces:
Running
Running
PDF yüklendiğinde sayfa aralığı girişleri aktifleşiyor
Browse files
ui.py
CHANGED
@@ -44,8 +44,18 @@ with gr.Blocks() as demo:
|
|
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)
|
48 |
-
end_page = gr.Number(label="Bitiş Sayfası", value=5, precision=0)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
49 |
|
50 |
mode_selector = gr.Dropdown(
|
51 |
choices=[
|
|
|
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)
|
48 |
+
end_page = gr.Number(label="Bitiş Sayfası", value=5, precision=0, interactive=False)
|
49 |
+
|
50 |
+
|
51 |
+
def enable_page_inputs(pdf):
|
52 |
+
return gr.update(interactive=True), gr.update(interactive=True)
|
53 |
+
|
54 |
+
pdf_input.change(
|
55 |
+
fn=enable_page_inputs,
|
56 |
+
inputs=[pdf_input],
|
57 |
+
outputs=[start_page, end_page]
|
58 |
+
)
|
59 |
|
60 |
mode_selector = gr.Dropdown(
|
61 |
choices=[
|