Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -1,9 +1,13 @@
|
|
1 |
import gradio as gr
|
2 |
import requests
|
3 |
import base64
|
|
|
4 |
from PIL import Image
|
5 |
from io import BytesIO
|
6 |
|
|
|
|
|
|
|
7 |
def call_api(negative_prompt, positive_prompt, api_key):
|
8 |
# API URL
|
9 |
url = "https://model-5qe9kjp3.api.baseten.co/development/predict"
|
@@ -52,9 +56,9 @@ interface = gr.Interface(
|
|
52 |
],
|
53 |
outputs="image",
|
54 |
title="Image Generation API Interface",
|
55 |
-
description="Enter the negative and positive prompts to generate an image."
|
56 |
-
debug=True # Enable debug mode
|
57 |
)
|
58 |
|
59 |
# Launch the interface
|
60 |
interface.launch()
|
|
|
|
1 |
import gradio as gr
|
2 |
import requests
|
3 |
import base64
|
4 |
+
import logging
|
5 |
from PIL import Image
|
6 |
from io import BytesIO
|
7 |
|
8 |
+
# Set up logging to display debug information
|
9 |
+
logging.basicConfig(level=logging.DEBUG)
|
10 |
+
|
11 |
def call_api(negative_prompt, positive_prompt, api_key):
|
12 |
# API URL
|
13 |
url = "https://model-5qe9kjp3.api.baseten.co/development/predict"
|
|
|
56 |
],
|
57 |
outputs="image",
|
58 |
title="Image Generation API Interface",
|
59 |
+
description="Enter the negative and positive prompts to generate an image."
|
|
|
60 |
)
|
61 |
|
62 |
# Launch the interface
|
63 |
interface.launch()
|
64 |
+
|