rootglitch commited on
Commit
41d5922
·
1 Parent(s): 8862662
Files changed (1) hide show
  1. app.py +17 -17
app.py CHANGED
@@ -349,31 +349,31 @@ def encode_image(image):
349
  def generate_ai_bg(input_img, prompt):
350
  hf_input_img = encode_image(input_img)
351
 
352
- handler = fal_client.submit(
353
- "fal-ai/iclight-v2",
354
- arguments={
355
- "prompt": prompt,
356
- "image_url": hf_input_img
357
- },
358
- webhook_url="https://optional.webhook.url/for/results",
359
- )
360
 
361
- request_id = handler.request_id
362
 
363
- status = fal_client.status("fal-ai/iclight-v2", request_id, with_logs=True)
364
 
365
- result = fal_client.result("fal-ai/iclight-v2", request_id)
366
 
367
- ic_light_img = result['images'][0]['url']
368
 
369
- return ic_light_img
370
 
371
- def generate_image(input_img, prompt):
372
- # ai_gen_image = generate_ai_bg(input_img, prompt)
373
 
374
- # return ai_gen_image
 
375
 
376
- print('FAL_KEY = ', FAL_KEY)
377
 
378
  def create_ui():
379
  """Create Gradio UI for CarViz demo"""
 
349
  def generate_ai_bg(input_img, prompt):
350
  hf_input_img = encode_image(input_img)
351
 
352
+ # handler = fal_client.submit(
353
+ # "fal-ai/iclight-v2",
354
+ # arguments={
355
+ # "prompt": prompt,
356
+ # "image_url": hf_input_img
357
+ # },
358
+ # webhook_url="https://optional.webhook.url/for/results",
359
+ # )
360
 
361
+ # request_id = handler.request_id
362
 
363
+ # status = fal_client.status("fal-ai/iclight-v2", request_id, with_logs=True)
364
 
365
+ # result = fal_client.result("fal-ai/iclight-v2", request_id)
366
 
367
+ # ic_light_img = result['images'][0]['url']
368
 
369
+ # return ic_light_img
370
 
371
+ return hf_input_img
 
372
 
373
+ def generate_image(input_img, prompt):
374
+ ai_gen_image = generate_ai_bg(input_img, prompt)
375
 
376
+ return ai_gen_image
377
 
378
  def create_ui():
379
  """Create Gradio UI for CarViz demo"""