ivelin commited on
Commit
9cdce98
·
1 Parent(s): e21c6cb

fix: handle empty string for model revision

Browse files
Files changed (1) hide show
  1. app.py +4 -0
app.py CHANGED
@@ -92,6 +92,10 @@ def translate_point_coords_from_out_to_in(point=None, input_image_size=None, out
92
  def process_refexp(image: Image, prompt: str, model_revision: str = 'main'):
93
 
94
  print(f"(image, prompt): {image}, {prompt}")
 
 
 
 
95
  print(f"model checkpoint revision: {model_revision}")
96
 
97
  load_model(model_revision)
 
92
  def process_refexp(image: Image, prompt: str, model_revision: str = 'main'):
93
 
94
  print(f"(image, prompt): {image}, {prompt}")
95
+
96
+ if not pretrained_revision:
97
+ pretrained_revision = 'main'
98
+
99
  print(f"model checkpoint revision: {model_revision}")
100
 
101
  load_model(model_revision)