frendyrachman commited on
Commit
fce9cbb
Β·
verified Β·
1 Parent(s): ff1fae2

Update app.py

Browse files

fixing input date

Files changed (1) hide show
  1. app.py +20 -9
app.py CHANGED
@@ -148,17 +148,28 @@ def main_process(files, tanggal_berangkat, tanggal_pulang):
148
  # Gradio UI update: add ".zip" to accepted file types
149
  with gr.Blocks() as demo:
150
  gr.Markdown("## 🧠 Document Analyzer using Gemini AI for Visa Document Checking ✈️ ")
151
- with gr.Row():
152
- file_input = gr.File(
153
- label="Upload PDFs, Images or ZIP files (Multiple Supported)",
154
- file_types=[".pdf", ".jpg", ".jpeg", ".png", ".zip"],
155
- file_count="multiple"
156
- )
157
- gr.Textbox(label="πŸ“… Tanggal Keberangkatan", value=str(datetime.date.today())),
158
- gr.Textbox(label="πŸ“… Tanggal Kepulangan", value=str(datetime.date.today() + datetime.timedelta(days=15))
159
- )
 
 
 
 
 
 
 
 
 
 
160
  run_btn = gr.Button("πŸƒ Run Analysis")
161
  output = gr.Textbox(label="πŸ“ Summary Result", lines=20)
 
162
  run_btn.click(fn=main_process, inputs=[file_input, tanggal_berangkat, tanggal_pulang], outputs=output)
163
 
164
  demo.launch()
 
148
  # Gradio UI update: add ".zip" to accepted file types
149
  with gr.Blocks() as demo:
150
  gr.Markdown("## 🧠 Document Analyzer using Gemini AI for Visa Document Checking ✈️ ")
151
+
152
+ file_input = gr.File(
153
+ label="Upload PDFs, Images or ZIP files (Multiple Supported)",
154
+ file_types=[".pdf", ".jpg", ".jpeg", ".png", ".zip"],
155
+ file_count="multiple"
156
+ )
157
+
158
+ tanggal_berangkat = gr.Textbox(
159
+ label="Tanggal Keberangkatan",
160
+ placeholder="Masukan Tanggal Keberangkatan",
161
+ type="text"
162
+ )
163
+
164
+ tanggal_pulang = gr.Textbox(
165
+ label="Tanggal Kepulangan",
166
+ placeholder="Masukan Tanggal Kepulangan",
167
+ type="text"
168
+ )
169
+
170
  run_btn = gr.Button("πŸƒ Run Analysis")
171
  output = gr.Textbox(label="πŸ“ Summary Result", lines=20)
172
+
173
  run_btn.click(fn=main_process, inputs=[file_input, tanggal_berangkat, tanggal_pulang], outputs=output)
174
 
175
  demo.launch()