Spaces:
Runtime error
Runtime error
update gradio version and add progress bar
Browse files
app.py
CHANGED
|
@@ -29,12 +29,17 @@ def get_model_list(category):
|
|
| 29 |
|
| 30 |
def get_initial_prompt(model_nm):
|
| 31 |
#Example - a photo of shbrcky dog
|
|
|
|
|
|
|
| 32 |
user_model_nm = model_nm.split('/')[-1]
|
| 33 |
if '-' in user_model_nm:
|
| 34 |
prompt = " ".join(user_model_nm.split('-'))
|
| 35 |
else:
|
| 36 |
prompt = user_model_nm
|
| 37 |
-
|
|
|
|
|
|
|
|
|
|
| 38 |
|
| 39 |
def get_pipeline(model_name): #, progress=gr.Progress(track_tqdm=True)):
|
| 40 |
#Using diffusers pipeline to generate an image for the demo
|
|
|
|
| 29 |
|
| 30 |
def get_initial_prompt(model_nm):
|
| 31 |
#Example - a photo of shbrcky dog
|
| 32 |
+
print(******Inside get initial prompt******)
|
| 33 |
+
print(f"model name from Gradio input is - {model_nm}")
|
| 34 |
user_model_nm = model_nm.split('/')[-1]
|
| 35 |
if '-' in user_model_nm:
|
| 36 |
prompt = " ".join(user_model_nm.split('-'))
|
| 37 |
else:
|
| 38 |
prompt = user_model_nm
|
| 39 |
+
print(f"Extracted name for constructing Prompt is - {user_model_nm}")
|
| 40 |
+
print(f"Extracted name for constructing Prompt is - {prompt}")
|
| 41 |
+
prompt = "a photo of " + prompt + " "
|
| 42 |
+
return gr.Textbox.update(value=prompt)
|
| 43 |
|
| 44 |
def get_pipeline(model_name): #, progress=gr.Progress(track_tqdm=True)):
|
| 45 |
#Using diffusers pipeline to generate an image for the demo
|