luisoala commited on
Commit
e9a6079
·
1 Parent(s): 60c8c6c

move results down

Browse files
Files changed (1) hide show
  1. app.py +24 -18
app.py CHANGED
@@ -42,25 +42,31 @@ def create_ui():
42
  # Track the active tab for conditional UI updates
43
  active_tab = gr.State("upload") # Default to upload tab
44
 
45
- # Move the tabs before the validation results
46
- with gr.Tabs() as tabs:
47
- with gr.TabItem("Upload File", id="upload_tab"):
48
- file_input = gr.File(label="Upload Croissant JSON-LD File", file_types=[".json", ".jsonld"])
49
- validate_btn = gr.Button("Validate Uploaded File", variant="primary")
50
-
51
- with gr.TabItem("URL Input", id="url_tab"):
52
- url_input = gr.Textbox(
53
- label="Enter Croissant JSON-LD URL",
54
- placeholder="e.g. https://huggingface.co/api/datasets/facebook/natural_reasoning/croissant"
55
- )
56
- fetch_btn = gr.Button("Fetch and Validate", variant="primary")
 
 
57
 
58
- # Create containers for validation results - moved below inputs for better flow
59
- upload_progress = gr.HTML(
60
- """<div class="progress-container">
61
- <div class="progress-status">Ready for validation</div>
62
- </div>""", visible=True)
63
- validation_results = gr.HTML(visible=False)
 
 
 
 
64
 
65
  # Define CSS for the validation UI - improved for dark mode compatibility
66
  gr.HTML("""
 
42
  # Track the active tab for conditional UI updates
43
  active_tab = gr.State("upload") # Default to upload tab
44
 
45
+ # Create a container for the entire input section
46
+ with gr.Group():
47
+ # Input tabs
48
+ with gr.Tabs() as tabs:
49
+ with gr.TabItem("Upload File", id="upload_tab"):
50
+ file_input = gr.File(label="Upload Croissant JSON-LD File", file_types=[".json", ".jsonld"])
51
+ validate_btn = gr.Button("Validate Uploaded File", variant="primary")
52
+
53
+ with gr.TabItem("URL Input", id="url_tab"):
54
+ url_input = gr.Textbox(
55
+ label="Enter Croissant JSON-LD URL",
56
+ placeholder="e.g. https://huggingface.co/api/datasets/facebook/natural_reasoning/croissant"
57
+ )
58
+ fetch_btn = gr.Button("Fetch and Validate", variant="primary")
59
 
60
+ # Now create the validation results section AFTER the input section
61
+ with gr.Group():
62
+ # Progress/status message
63
+ upload_progress = gr.HTML(
64
+ """<div class="progress-container">
65
+ <div class="progress-status">Ready for validation</div>
66
+ </div>""", visible=True)
67
+
68
+ # Validation results
69
+ validation_results = gr.HTML(visible=False)
70
 
71
  # Define CSS for the validation UI - improved for dark mode compatibility
72
  gr.HTML("""