Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -1,7 +1,6 @@
|
|
1 |
import gradio as gr
|
2 |
import time
|
3 |
import logging
|
4 |
-
import json
|
5 |
|
6 |
# Set up logging
|
7 |
logging.basicConfig(level=logging.INFO, format='%(asctime)s - %(levelname)s - %(message)s')
|
@@ -35,7 +34,6 @@ def generate_image(prompt, max_retries=5):
|
|
35 |
return result, f"Image generated successfully\nGeneration time: {generation_time:.2f} seconds"
|
36 |
except Exception as e:
|
37 |
logger.error(f"Error on attempt {attempt + 1}: {str(e)}")
|
38 |
-
logger.error(json.dumps(result))
|
39 |
if attempt < max_retries - 1:
|
40 |
logger.info(f"Retrying... ({attempt + 2}/{max_retries})")
|
41 |
else:
|
|
|
1 |
import gradio as gr
|
2 |
import time
|
3 |
import logging
|
|
|
4 |
|
5 |
# Set up logging
|
6 |
logging.basicConfig(level=logging.INFO, format='%(asctime)s - %(levelname)s - %(message)s')
|
|
|
34 |
return result, f"Image generated successfully\nGeneration time: {generation_time:.2f} seconds"
|
35 |
except Exception as e:
|
36 |
logger.error(f"Error on attempt {attempt + 1}: {str(e)}")
|
|
|
37 |
if attempt < max_retries - 1:
|
38 |
logger.info(f"Retrying... ({attempt + 2}/{max_retries})")
|
39 |
else:
|