acecalisto3 commited on
Commit
b11a45d
·
verified ·
1 Parent(s): 495e4d5

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +9 -15
app.py CHANGED
@@ -481,21 +481,15 @@ with gr.Blocks(css=css) as demo:
481
  search_bar = gr.Textbox(max_lines=1, placeholder="Search datasets, get infinite results", show_label=False, container=False, scale=9)
482
  search_button = gr.Button("🔍", variant="primary", scale=1)
483
 
484
- # Add File Upload Component
485
- with gr.Row():
486
- file_input = gr.File(label="Upload a large file", type="file", file_count="single")
487
- process_button = gr.Button("Process File") # Button to process the file
488
- output_text = gr.Textbox(label="Output") # Output area for processed result
489
-
490
- # Define the file processing function
491
- def handle_uploaded_file(file):
492
- with open(file.name, 'rb') as f:
493
- content = f.read() # Read the file content
494
- return f"Processed {len(content)} bytes from the file."
495
-
496
- # Connect the button to the file processing function
497
- process_button.click(fn=handle_uploaded_file, inputs=file_input, outputs=output_text)
498
-
499
 
500
  @search_button.click(inputs=search_bar, outputs=button_groups + buttons + [generated_texts_state])
501
  def search_dataset_from_search_button(search_query):
 
481
  search_bar = gr.Textbox(max_lines=1, placeholder="Search datasets, get infinite results", show_label=False, container=False, scale=9)
482
  search_button = gr.Button("🔍", variant="primary", scale=1)
483
 
484
+ with gr.Blocks(css=css) as demo:
485
+ generated_texts_state = gr.State((landing_page_datasets_generated_text,))
486
+
487
+ with gr.Blocks(css=css) as demo:
488
+ generated_texts_state = gr.State((landing_page_datasets_generated_text,))
489
+ with gr.Column() as search_page:
490
+ with gr.Row():
491
+ search_bar = gr.Textbox(max_lines=1, placeholder="Search datasets, get infinite results", show_label=False, container=False, scale=9)
492
+ search_button = gr.Button("🔍", variant="primary", scale=1)
 
 
 
 
 
 
493
 
494
  @search_button.click(inputs=search_bar, outputs=button_groups + buttons + [generated_texts_state])
495
  def search_dataset_from_search_button(search_query):