move results down
Browse files
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 |
-
#
|
46 |
-
with gr.
|
47 |
-
|
48 |
-
|
49 |
-
|
50 |
-
|
51 |
-
|
52 |
-
|
53 |
-
|
54 |
-
|
55 |
-
|
56 |
-
|
|
|
|
|
57 |
|
58 |
-
#
|
59 |
-
|
60 |
-
|
61 |
-
|
62 |
-
|
63 |
-
|
|
|
|
|
|
|
|
|
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("""
|