Kashif Ahmed commited on
Commit
c4dae51
·
1 Parent(s): 6f20514
Files changed (1) hide show
  1. app.py +6 -1
app.py CHANGED
@@ -15,8 +15,13 @@ def process_image(image):
15
  file_path = os.path.join(SAVE_DIR, os.path.basename(image))
16
  Image.open(image).save(file_path)
17
 
 
 
 
 
 
18
  # Process the image (if needed, here we just return a greeting and the path)
19
- return f"Hello! The image has been saved to {file_path}.", Image.open(file_path)
20
 
21
  # Gradio interface for image uploading and processing
22
  demo = gr.Interface(
 
15
  file_path = os.path.join(SAVE_DIR, os.path.basename(image))
16
  Image.open(image).save(file_path)
17
 
18
+ # Log all files in the uploads directory
19
+ files_in_uploads = os.listdir(SAVE_DIR)
20
+ log_message = f"Files in uploads directory after saving:\n{', '.join(files_in_uploads)}"
21
+ print(log_message) # Print to console
22
+
23
  # Process the image (if needed, here we just return a greeting and the path)
24
+ return f"Hello! The image has been saved to {file_path}.\n\n{log_message}", Image.open(file_path)
25
 
26
  # Gradio interface for image uploading and processing
27
  demo = gr.Interface(