artificialguybr commited on
Commit
2a5f183
1 Parent(s): baeab79

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +7 -5
app.py CHANGED
@@ -28,7 +28,7 @@ def run_lora(prompt, selected_state, progress=gr.Progress(track_tqdm=True)):
28
  logging.debug(f"Inside run_lora, selected_state: {selected_state}")
29
  if not selected_state:
30
  logging.error("selected_state is None or empty.")
31
- raise gr.Error("You must select a LoRA")
32
 
33
  selected_lora_index = selected_state.index # Changed this line
34
  selected_lora = loras[selected_lora_index]
@@ -69,10 +69,12 @@ def run_lora(prompt, selected_state, progress=gr.Progress(track_tqdm=True)):
69
 
70
  with gr.Blocks(css="custom.css") as app:
71
  title = gr.Markdown("# artificialguybr LoRA portfolio")
72
- description = gr.Markdown( # Add this line
73
- "### This is my portfolio. Follow me on Twitter [@artificialguybr](https://twitter.com/artificialguybr). "
74
- "Note: The speed and generation quality are for demonstration purposes. "
75
- "For best quality, use Auto or Comfy. Special thanks to Hugging Face for their free inference API."
 
 
76
  )
77
  selected_state = gr.State()
78
  with gr.Row():
 
28
  logging.debug(f"Inside run_lora, selected_state: {selected_state}")
29
  if not selected_state:
30
  logging.error("selected_state is None or empty.")
31
+ raise gr.Error("You must select a LoRA before proceeding.") # Popup error when no LoRA is selected
32
 
33
  selected_lora_index = selected_state.index # Changed this line
34
  selected_lora = loras[selected_lora_index]
 
69
 
70
  with gr.Blocks(css="custom.css") as app:
71
  title = gr.Markdown("# artificialguybr LoRA portfolio")
72
+ description = gr.Markdown(
73
+ "### This is my portfolio. Follow me on Twitter [@artificialguybr](https://twitter.com/artificialguybr). \n"
74
+ "**Note**: The speed and generation quality are for demonstration purposes. "
75
+ "For best quality, use Auto or Comfy. \n"
76
+ "**Warning**: The API might take some time to deliver the image. \n" # Added warning about API delay
77
+ "Special thanks to Hugging Face for their free inference API."
78
  )
79
  selected_state = gr.State()
80
  with gr.Row():