apratim24 commited on
Commit
1a3a8f4
·
verified ·
1 Parent(s): ea96ba1

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +6 -5
app.py CHANGED
@@ -31,11 +31,12 @@ def generate_story(image, genre, style):
31
  except Exception as e:
32
  return f"An error occurred during inference: {str(e)}"
33
 
34
- # Define Gradio interface
35
- input_image = gr.inputs.Image(label="Upload any Image", type='pil')
36
- input_genre = gr.inputs.Dropdown(["Hindi", "Spanish", "Portuguese", "French", "German", "Italian", "Russian", "Japanese"], label="Input Genre")
37
- input_style = gr.inputs.Dropdown(["Hindi", "Spanish", "Portuguese", "French", "German", "Italian", "Russian", "Japanese"], label="Input Style")
38
- output_text = gr.outputs.Textbox(label="Generated Story", lines=8)
 
39
 
40
  gr.Interface(
41
  fn=generate_story,
 
31
  except Exception as e:
32
  return f"An error occurred during inference: {str(e)}"
33
 
34
+
35
+ # Gradio interface
36
+ input_image = gr.Image(label="Select Image",type="pil")
37
+ input_genre = gr.Dropdown(["Hindi", "Spanish", "Portuguese", "French", "German", "Italian", "Russian", "Japanese"], label="Input Genre")
38
+ input_style = gr.Dropdown(["Hindi", "Spanish", "Portuguese", "French", "German", "Italian", "Russian", "Japanese"], label="Input Style")
39
+ output_text = gr.Textbox(label="Generated Story",lines=8)
40
 
41
  gr.Interface(
42
  fn=generate_story,