Spaces:
Sleeping
Sleeping
Commit ·
6449907
1
Parent(s): 0b35e2d
Aggiungo file di configurazione per Hugging Face Space
Browse files
app.py
CHANGED
|
@@ -13,8 +13,7 @@ def process_batch_via_api(zip_file):
|
|
| 13 |
with open(zip_file.name, 'rb') as f:
|
| 14 |
files = {'file': (os.path.basename(zip_file.name), f, 'application/zip')}
|
| 15 |
yield "🚀 Invio del batch all'API... L'elaborazione potrebbe richiedere qualche minuto.", None
|
| 16 |
-
response = requests.post(API_URL, files=files, timeout=
|
| 17 |
-
response.raise_for_status()
|
| 18 |
data = response.json()
|
| 19 |
summary = data.get('summary', {})
|
| 20 |
formatted_report = f"""
|
|
|
|
| 13 |
with open(zip_file.name, 'rb') as f:
|
| 14 |
files = {'file': (os.path.basename(zip_file.name), f, 'application/zip')}
|
| 15 |
yield "🚀 Invio del batch all'API... L'elaborazione potrebbe richiedere qualche minuto.", None
|
| 16 |
+
response = requests.post(API_URL, files=files, timeout=600) # Timeout aumentato a 10 minuti response.raise_for_status()
|
|
|
|
| 17 |
data = response.json()
|
| 18 |
summary = data.get('summary', {})
|
| 19 |
formatted_report = f"""
|