juancopi81 commited on
Commit
fb23992
β€’
1 Parent(s): 52fa6fd

Add secret token as env variable

Browse files
Files changed (1) hide show
  1. app.py +3 -1
app.py CHANGED
@@ -1,3 +1,5 @@
 
 
1
  from contextlib import nullcontext
2
  import gradio as gr
3
  import torch
@@ -51,7 +53,7 @@ else:
51
  pipe = DiffusionPipeline.from_pretrained(
52
  model_id,
53
  custom_pipeline="multilingual_stable_diffusion",
54
- use_auth_token=st.secrets["USER_TOKEN"],
55
  detection_pipeline=language_detection_pipeline,
56
  translation_model=trans_model,
57
  translation_tokenizer=trans_tokenizer,
 
1
+ import os
2
+
3
  from contextlib import nullcontext
4
  import gradio as gr
5
  import torch
 
53
  pipe = DiffusionPipeline.from_pretrained(
54
  model_id,
55
  custom_pipeline="multilingual_stable_diffusion",
56
+ use_auth_token=os.environ["USER_TOKEN"],
57
  detection_pipeline=language_detection_pipeline,
58
  translation_model=trans_model,
59
  translation_tokenizer=trans_tokenizer,