Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
@@ -115,7 +115,7 @@ class URLProcessor:
|
|
115 |
try:
|
116 |
response = self.session.get(url, timeout=self.timeout)
|
117 |
response.raise_for_status()
|
118 |
-
|
119 |
'content': response.text,
|
120 |
'content_type': 'text/calendar',
|
121 |
'timestamp': datetime.now().isoformat()
|
@@ -281,8 +281,7 @@ def create_interface():
|
|
281 |
with gr.Tab("File Input"):
|
282 |
file_input = gr.File(
|
283 |
label="Upload text files or ZIP archives",
|
284 |
-
file_types=[".txt", ".zip", ".md", ".csv", ".json", ".xml"]
|
285 |
-
multiple=True # Allow multiple file uploads
|
286 |
)
|
287 |
|
288 |
with gr.Tab("Text Input"):
|
@@ -392,13 +391,13 @@ def create_interface():
|
|
392 |
chat_input.submit(
|
393 |
chat_with_data,
|
394 |
inputs=chat_input,
|
395 |
-
outputs=chat_output
|
396 |
)
|
397 |
|
398 |
gr.Markdown("""
|
399 |
### Usage Guidelines
|
400 |
- **URL Processing**: Enter valid HTTP/HTTPS URLs
|
401 |
-
- **File Input**: Upload text files or ZIP archives (
|
402 |
- **Text Input**: Direct text processing
|
403 |
- **Chat**: Load your JSON data and ask questions about it
|
404 |
- Advanced cleaning and validation included
|
|
|
115 |
try:
|
116 |
response = self.session.get(url, timeout=self.timeout)
|
117 |
response.raise_for_status()
|
118 |
+
return {
|
119 |
'content': response.text,
|
120 |
'content_type': 'text/calendar',
|
121 |
'timestamp': datetime.now().isoformat()
|
|
|
281 |
with gr.Tab("File Input"):
|
282 |
file_input = gr.File(
|
283 |
label="Upload text files or ZIP archives",
|
284 |
+
file_types=[".txt", ".zip", ".md", ".csv", ".json", ".xml"]
|
|
|
285 |
)
|
286 |
|
287 |
with gr.Tab("Text Input"):
|
|
|
391 |
chat_input.submit(
|
392 |
chat_with_data,
|
393 |
inputs=chat_input,
|
394 |
+
outputs= chat_output
|
395 |
)
|
396 |
|
397 |
gr.Markdown("""
|
398 |
### Usage Guidelines
|
399 |
- **URL Processing**: Enter valid HTTP/HTTPS URLs
|
400 |
+
- **File Input**: Upload text files or ZIP archives (single file allowed)
|
401 |
- **Text Input**: Direct text processing
|
402 |
- **Chat**: Load your JSON data and ask questions about it
|
403 |
- Advanced cleaning and validation included
|