Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -152,15 +152,20 @@ with gr.Blocks() as iface:
|
|
152 |
coppa_checkbox = gr.Checkbox(label="COPPA (US <13)")
|
153 |
|
154 |
gr.Markdown("Optional: upload additional PDFs if needed (national regulation, school policy)")
|
155 |
-
additional_pdfs = gr.File(
|
|
|
|
|
|
|
|
|
|
|
156 |
|
157 |
load_button = gr.Button("Load PDFs")
|
158 |
load_output = gr.Textbox(label="Load Status")
|
159 |
-
|
160 |
gr.Markdown("Ask your data protection related question")
|
161 |
query_input = gr.Textbox(label="Your Question", placeholder="Ask your question here...")
|
162 |
query_button = gr.Button("Submit Query")
|
163 |
-
|
164 |
gr.Markdown("Results")
|
165 |
rag_output = gr.Textbox(label="RAG Pipeline (Llama3.1) Response")
|
166 |
gemini_output = gr.Textbox(label="Long Context (Gemini 1.5 Pro) Response")
|
@@ -181,4 +186,12 @@ with gr.Blocks() as iface:
|
|
181 |
outputs=[rag_output, gemini_output, final_output]
|
182 |
)
|
183 |
|
184 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
152 |
coppa_checkbox = gr.Checkbox(label="COPPA (US <13)")
|
153 |
|
154 |
gr.Markdown("Optional: upload additional PDFs if needed (national regulation, school policy)")
|
155 |
+
additional_pdfs = gr.File(
|
156 |
+
file_count="multiple",
|
157 |
+
label="Upload additional PDFs",
|
158 |
+
file_types=[".pdf"],
|
159 |
+
elem_id="file_upload"
|
160 |
+
)
|
161 |
|
162 |
load_button = gr.Button("Load PDFs")
|
163 |
load_output = gr.Textbox(label="Load Status")
|
164 |
+
|
165 |
gr.Markdown("Ask your data protection related question")
|
166 |
query_input = gr.Textbox(label="Your Question", placeholder="Ask your question here...")
|
167 |
query_button = gr.Button("Submit Query")
|
168 |
+
|
169 |
gr.Markdown("Results")
|
170 |
rag_output = gr.Textbox(label="RAG Pipeline (Llama3.1) Response")
|
171 |
gemini_output = gr.Textbox(label="Long Context (Gemini 1.5 Pro) Response")
|
|
|
186 |
outputs=[rag_output, gemini_output, final_output]
|
187 |
)
|
188 |
|
189 |
+
# Add custom CSS to make the file upload area more compact
|
190 |
+
css = """
|
191 |
+
#file_upload {
|
192 |
+
max-height: 100px;
|
193 |
+
overflow-y: auto;
|
194 |
+
}
|
195 |
+
"""
|
196 |
+
|
197 |
+
iface.launch(css=css)
|