Lisandro commited on
Commit
63bf80a
·
1 Parent(s): 81bde47

refactor: Update login route from `/login` to `/auth` and restrict logout route to GET method.

Browse files
Files changed (1) hide show
  1. app.py +15 -0
app.py CHANGED
@@ -198,10 +198,25 @@ ADAPTER_SPECS = {
198
  "adapter_name": "inflate",
199
  "prompt": "inflate the [insert subject]"
200
  },
 
 
 
 
 
 
201
  }
202
 
203
  LOADED_ADAPTERS = set()
204
 
 
 
 
 
 
 
 
 
 
205
 
206
  @spaces.GPU(duration=20)
207
  def infer(
 
198
  "adapter_name": "inflate",
199
  "prompt": "inflate the [insert subject]"
200
  },
201
+ "Upscaler": {
202
+ "repo": "starsfriday/Qwen-Image-Edit-2511-Upscale2K",
203
+ "weights": "qwen_image_edit_2511_upscale.safetensors",
204
+ "adapter_name": "starsfriday-upscale-2k",
205
+ "prompt": "Upscale this picture to 4K resolution."
206
+ },
207
  }
208
 
209
  LOADED_ADAPTERS = set()
210
 
211
+ def update_lora(lora_adapter):
212
+ spec = ADAPTER_SPECS.get(lora_adapter)
213
+ if not spec:
214
+ raise gr.Error(f"Configuration not found for: {lora_adapter}")
215
+
216
+ adapter_name = spec["adapter_name"]
217
+ prompt = spec.get('prompt', "") # Use .get() to avoid KeyError if prompt is missing
218
+ return prompt
219
+
220
 
221
  @spaces.GPU(duration=20)
222
  def infer(