rawqubit commited on
Commit
c47616e
·
verified ·
1 Parent(s): 33dc1a5

Upload folder using huggingface_hub

Browse files
Files changed (1) hide show
  1. app.py +2 -3
app.py CHANGED
@@ -17,8 +17,7 @@ def generate_image(prompt, progress=gr.Progress()):
17
  progress(1.0, desc="Done!")
18
  return image
19
  except Exception as e:
20
- print(f"Error: {e}")
21
- return None
22
 
23
  # A sleek Gradio interface
24
  with gr.Blocks(theme=gr.themes.Soft()) as demo:
@@ -36,7 +35,7 @@ with gr.Blocks(theme=gr.themes.Soft()) as demo:
36
  ["A futuristic city built into a giant tree, cinematic lighting, conceptual art"],
37
  ["An astronaut riding a glowing translucent horse on the surface of Mars, 8k resolution"]
38
  ],
39
- inputs=prompt
40
  )
41
  with gr.Column(scale=1):
42
  output = gr.Image(label="Generated Artwork", type="pil")
 
17
  progress(1.0, desc="Done!")
18
  return image
19
  except Exception as e:
20
+ raise gr.Error(f"FLUX Inference Failed: {str(e)}")
 
21
 
22
  # A sleek Gradio interface
23
  with gr.Blocks(theme=gr.themes.Soft()) as demo:
 
35
  ["A futuristic city built into a giant tree, cinematic lighting, conceptual art"],
36
  ["An astronaut riding a glowing translucent horse on the surface of Mars, 8k resolution"]
37
  ],
38
+ inputs=[prompt]
39
  )
40
  with gr.Column(scale=1):
41
  output = gr.Image(label="Generated Artwork", type="pil")