AnseMin commited on
Commit
c9a5395
·
1 Parent(s): 0e1c90e

removing output format

Browse files
Files changed (1) hide show
  1. src/ui/ui.py +3 -9
src/ui/ui.py CHANGED
@@ -148,6 +148,8 @@ def create_ui():
148
  cancel_requested = gr.State(False)
149
  # State to store the conversion thread
150
  conversion_thread = gr.State(None)
 
 
151
 
152
  with gr.Tabs():
153
  with gr.Tab("Upload and Convert"):
@@ -190,14 +192,6 @@ def create_ui():
190
  convert_button = gr.Button("Convert", variant="primary")
191
  cancel_button = gr.Button("Cancel", variant="stop", visible=False)
192
 
193
- with gr.Tab("Output Format"):
194
- with gr.Group(elem_classes=["settings-group"]):
195
- output_format = gr.Radio(
196
- label="Output Format",
197
- choices=["Markdown", "JSON", "Text", "Document Tags"],
198
- value="Markdown"
199
- )
200
-
201
  with gr.Tab("Chat with Document"):
202
  document_text_state = gr.State("")
203
  chatbot = gr.Chatbot(label="Chat", type="messages")
@@ -243,7 +237,7 @@ def create_ui():
243
  queue=False # Execute immediately
244
  ).then(
245
  fn=handle_convert,
246
- inputs=[file_input, provider_dropdown, ocr_dropdown, output_format, cancel_requested],
247
  outputs=[file_display, file_download, convert_button, cancel_button, conversion_thread]
248
  )
249
 
 
148
  cancel_requested = gr.State(False)
149
  # State to store the conversion thread
150
  conversion_thread = gr.State(None)
151
+ # State to store the output format (fixed to Markdown)
152
+ output_format_state = gr.State("Markdown")
153
 
154
  with gr.Tabs():
155
  with gr.Tab("Upload and Convert"):
 
192
  convert_button = gr.Button("Convert", variant="primary")
193
  cancel_button = gr.Button("Cancel", variant="stop", visible=False)
194
 
 
 
 
 
 
 
 
 
195
  with gr.Tab("Chat with Document"):
196
  document_text_state = gr.State("")
197
  chatbot = gr.Chatbot(label="Chat", type="messages")
 
237
  queue=False # Execute immediately
238
  ).then(
239
  fn=handle_convert,
240
+ inputs=[file_input, provider_dropdown, ocr_dropdown, output_format_state, cancel_requested],
241
  outputs=[file_display, file_download, convert_button, cancel_button, conversion_thread]
242
  )
243