Spaces:
Runtime error
Runtime error
artificialguybr
commited on
Commit
•
c133494
1
Parent(s):
648148b
Update app.py
Browse files
app.py
CHANGED
@@ -12,6 +12,7 @@ with open('loras.json', 'r') as f:
|
|
12 |
# API call function
|
13 |
def query(payload, api_url, token):
|
14 |
headers = {"Authorization": f"Bearer {token}"}
|
|
|
15 |
response = requests.post(api_url, headers=headers, json=payload)
|
16 |
return io.BytesIO(response.content)
|
17 |
|
@@ -42,9 +43,7 @@ with gr.Blocks(css="custom.css") as app:
|
|
42 |
prompt = gr.Textbox(label="Prompt", show_label=False, lines=1, max_lines=1, placeholder="Type a prompt after selecting a LoRA")
|
43 |
button = gr.Button("Run")
|
44 |
result = gr.Image(interactive=False, label="Generated Image")
|
45 |
-
|
46 |
-
pass # Placeholder for advanced options
|
47 |
-
|
48 |
# Placeholder for gallery.select function
|
49 |
def update_selection():
|
50 |
pass
|
|
|
12 |
# API call function
|
13 |
def query(payload, api_url, token):
|
14 |
headers = {"Authorization": f"Bearer {token}"}
|
15 |
+
print(f"Sending API request with payload: {payload}") # Print the API request payload
|
16 |
response = requests.post(api_url, headers=headers, json=payload)
|
17 |
return io.BytesIO(response.content)
|
18 |
|
|
|
43 |
prompt = gr.Textbox(label="Prompt", show_label=False, lines=1, max_lines=1, placeholder="Type a prompt after selecting a LoRA")
|
44 |
button = gr.Button("Run")
|
45 |
result = gr.Image(interactive=False, label="Generated Image")
|
46 |
+
|
|
|
|
|
47 |
# Placeholder for gallery.select function
|
48 |
def update_selection():
|
49 |
pass
|