svjack commited on
Commit
9837774
1 Parent(s): 0f770d2

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -3
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
- #with gr.Blocks(css=css) as demo:
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(