celinah HF Staff commited on
Commit
4540631
·
1 Parent(s): 3a09df2
Files changed (1) hide show
  1. app.py +2 -0
app.py CHANGED
@@ -86,6 +86,7 @@ def set_fal_key(fal_key_from_ui: str | None):
86
  global FAL_KEY
87
  if fal_key_from_ui and fal_key_from_ui.strip():
88
  FAL_KEY = fal_key_from_ui.strip()
 
89
  print("FAL_KEY has been set from UI input.")
90
  gr.Info("FAL_KEY has been updated from UI input.")
91
  elif not fal_key_from_ui and FAL_KEY:
@@ -160,6 +161,7 @@ def generate_video_from_image(
160
  try:
161
  progress(0.1, desc="Uploading image...")
162
  print("Uploading image to fal.ai storage...")
 
163
  image_url = fal_client.upload_file(image_filepath)
164
  print(f"Image uploaded, URL: {image_url}")
165
  progress(0.3, desc="Image uploaded. Submitting video request...")
 
86
  global FAL_KEY
87
  if fal_key_from_ui and fal_key_from_ui.strip():
88
  FAL_KEY = fal_key_from_ui.strip()
89
+ os.environ["FAL_KEY"] = FAL_KEY
90
  print("FAL_KEY has been set from UI input.")
91
  gr.Info("FAL_KEY has been updated from UI input.")
92
  elif not fal_key_from_ui and FAL_KEY:
 
161
  try:
162
  progress(0.1, desc="Uploading image...")
163
  print("Uploading image to fal.ai storage...")
164
+ print("FAL_KEY: ", os.environ.get("FAL_KEY"))
165
  image_url = fal_client.upload_file(image_filepath)
166
  print(f"Image uploaded, URL: {image_url}")
167
  progress(0.3, desc="Image uploaded. Submitting video request...")