Spaces:
Build error
Build error
fix: prevent processing empty csv
Browse files
app.py
CHANGED
|
@@ -11,6 +11,8 @@ import json
|
|
| 11 |
|
| 12 |
|
| 13 |
def dctap_interface(csvfile_content, config_content, uris, warnings, output_format):
|
|
|
|
|
|
|
| 14 |
if config_content:
|
| 15 |
config_dict = tapshex_config(config_str=config_content)
|
| 16 |
else:
|
|
|
|
| 11 |
|
| 12 |
|
| 13 |
def dctap_interface(csvfile_content, config_content, uris, warnings, output_format):
|
| 14 |
+
if not csvfile_content.strip():
|
| 15 |
+
return "CSV file content is empty. Please provide valid input."
|
| 16 |
if config_content:
|
| 17 |
config_dict = tapshex_config(config_str=config_content)
|
| 18 |
else:
|