ysharma HF staff commited on
Commit
6efe03f
1 Parent(s): 3453933
Files changed (1) hide show
  1. app.py +5 -1
app.py CHANGED
@@ -37,7 +37,11 @@ def make_clickable_model(model_name, link=None):
37
  link = "https://huggingface.co/" + model_name
38
 
39
  #adding functionality for demo
40
- prompt = "a photo of " + ' '.join(model_name.split('/')[-1].split['-']) + str(prompt)
 
 
 
 
41
  pipeline = StableDiffusionPipeline.from_pretrained(model_name) #("ashiqabdulkhader/shiba-dog") #('pharma/sugar-glider')
42
  image_demo = pipeline(prompt).images[0]
43
 
 
37
  link = "https://huggingface.co/" + model_name
38
 
39
  #adding functionality for demo
40
+ user_model_nm = model_name.split('/')[-1]
41
+ print(f"user and model name is - {user_model_nm}")
42
+ model_nm = " ".join(user_model_nm.split('-'))
43
+ print(f"model name is - {model_nm}")
44
+ prompt = "a photo of " + model_nm + str(prompt)
45
  pipeline = StableDiffusionPipeline.from_pretrained(model_name) #("ashiqabdulkhader/shiba-dog") #('pharma/sugar-glider')
46
  image_demo = pipeline(prompt).images[0]
47