celinah HF Staff commited on
Commit
9823696
·
1 Parent(s): c908ca0
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -9,8 +9,8 @@ MAX_SEED = np.iinfo(np.int32).max
9
  MAX_IMAGE_SIZE = 2048
10
 
11
 
12
- def infer(prompt, seed=42, randomize_seed=False, width=1024, height=1024, num_inference_steps=4, progress=gr.Progress(track_tqdm=True)):
13
- client = InferenceClient(provider="fal-ai")
14
  image = client.text_to_image(
15
  prompt=prompt,
16
  width=width,
 
9
  MAX_IMAGE_SIZE = 2048
10
 
11
 
12
+ def infer(oauth_token: gr.OAuthToken | None, prompt, seed=42, randomize_seed=False, width=1024, height=1024, num_inference_steps=4, progress=gr.Progress(track_tqdm=True)):
13
+ client = InferenceClient(provider="fal-ai", token=oauth_token.token)
14
  image = client.text_to_image(
15
  prompt=prompt,
16
  width=width,