ginipick commited on
Commit
772fb9a
·
verified ·
1 Parent(s): bb4e06a

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +11 -0
app.py CHANGED
@@ -9,6 +9,17 @@ import torch
9
  from diffusers import DiffusionPipeline
10
  from PIL import Image
11
 
 
 
 
 
 
 
 
 
 
 
 
12
  # Create permanent storage directory
13
  SAVE_DIR = "saved_images" # Gradio will handle the persistence
14
  if not os.path.exists(SAVE_DIR):
 
9
  from diffusers import DiffusionPipeline
10
  from PIL import Image
11
 
12
+ # Temporary fix to patch the gradio_client.utils module
13
+ import gradio_client.utils
14
+ original_get_type = gradio_client.utils.get_type
15
+
16
+ def patched_get_type(schema):
17
+ if not isinstance(schema, dict):
18
+ return "any" # Default to "any" type for non-dict schemas
19
+ return original_get_type(schema)
20
+
21
+ gradio_client.utils.get_type = patched_get_type
22
+
23
  # Create permanent storage directory
24
  SAVE_DIR = "saved_images" # Gradio will handle the persistence
25
  if not os.path.exists(SAVE_DIR):