Spaces:
Runtime error
Runtime error
Commit
·
68a9967
1
Parent(s):
0a5247e
Update app.py
Browse files
app.py
CHANGED
|
@@ -43,10 +43,12 @@ with gr.Blocks(css="custom.css") as demo:
|
|
| 43 |
token = os.getenv("API_TOKEN") # This will read the API token set in your managed environment
|
| 44 |
payload = {"inputs": f"{prompt} {trigger_word}"}
|
| 45 |
|
|
|
|
| 46 |
image_bytes = query(payload, api_url, token)
|
|
|
|
| 47 |
return Image.open(image_bytes)
|
| 48 |
|
| 49 |
-
|
| 50 |
prompt.submit(
|
| 51 |
fn=run_lora,
|
| 52 |
inputs=[prompt, weight, selected_state],
|
|
|
|
| 43 |
token = os.getenv("API_TOKEN") # This will read the API token set in your managed environment
|
| 44 |
payload = {"inputs": f"{prompt} {trigger_word}"}
|
| 45 |
|
| 46 |
+
print("Calling query function...")
|
| 47 |
image_bytes = query(payload, api_url, token)
|
| 48 |
+
print("Query function executed successfully.")
|
| 49 |
return Image.open(image_bytes)
|
| 50 |
|
| 51 |
+
print("Starting Gradio UI...")
|
| 52 |
prompt.submit(
|
| 53 |
fn=run_lora,
|
| 54 |
inputs=[prompt, weight, selected_state],
|