Shuang59 commited on
Commit
04c4c30
β€’
1 Parent(s): 5a31388

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -4
app.py CHANGED
@@ -7,9 +7,7 @@ Original file is located at
7
  https://colab.research.google.com/drive/19xx6Nu4FeiGj-TzTUFxBf-15IkeuFx_F
8
  """
9
 
10
- import os
11
- USER_TOKEN = os.environ.getattribute("USER_TOKEN")
12
-
13
  import gradio as gr
14
  import torch as th
15
 
@@ -31,7 +29,7 @@ print(device)
31
  # init stable diffusion model
32
  pipe = StableDiffusionPipeline.from_pretrained(
33
  "CompVis/stable-diffusion-v1-4",
34
- use_auth_token=USER_TOKEN
35
  ).to(device)
36
 
37
 
 
7
  https://colab.research.google.com/drive/19xx6Nu4FeiGj-TzTUFxBf-15IkeuFx_F
8
  """
9
 
10
+ import streamlit as st
 
 
11
  import gradio as gr
12
  import torch as th
13
 
 
29
  # init stable diffusion model
30
  pipe = StableDiffusionPipeline.from_pretrained(
31
  "CompVis/stable-diffusion-v1-4",
32
+ use_auth_token=st.secrets["USER_TOKEN"]
33
  ).to(device)
34
 
35