Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
@@ -57,7 +57,8 @@ def generate_txt2img(current_model, prompt, is_negative=False, image_style="None
|
|
57 |
|
58 |
API_TOKEN = os.environ.get("HF_READ_TOKEN")
|
59 |
headers = {"Authorization": f"Bearer {API_TOKEN}"}
|
60 |
-
|
|
|
61 |
api = InferenceApi(current_model)
|
62 |
api.headers = headers
|
63 |
|
@@ -202,8 +203,8 @@ css = """
|
|
202 |
}
|
203 |
"""
|
204 |
|
205 |
-
|
206 |
-
with gr.Blocks() as demo:
|
207 |
|
208 |
favicon = '<img src="" width="48px" style="display: inline">'
|
209 |
gr.Markdown(
|
|
|
57 |
|
58 |
API_TOKEN = os.environ.get("HF_READ_TOKEN")
|
59 |
headers = {"Authorization": f"Bearer {API_TOKEN}"}
|
60 |
+
if type(current_model) != type(""):
|
61 |
+
current_model = "stabilityai/stable-diffusion-2-1"
|
62 |
api = InferenceApi(current_model)
|
63 |
api.headers = headers
|
64 |
|
|
|
203 |
}
|
204 |
"""
|
205 |
|
206 |
+
with gr.Blocks(css=css) as demo:
|
207 |
+
#with gr.Blocks() as demo:
|
208 |
|
209 |
favicon = '<img src="" width="48px" style="display: inline">'
|
210 |
gr.Markdown(
|