Saiteja commited on
Commit
1ec4b68
1 Parent(s): 072bf32

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +9 -1
app.py CHANGED
@@ -9,6 +9,11 @@ def generate(celebrity, movie,setting):
9
  image = pipe(prompt).images[0]
10
  return image
11
 
 
 
 
 
 
12
  gr.Interface(
13
  fn = generate,
14
  inputs=[
@@ -17,5 +22,8 @@ gr.Interface(
17
  gr.inputs.Textbox(label="Setting")
18
  ],
19
  outputs= gr.outputs.Image(label="Generated movie poster",type='pil'),
20
- title="Movie Poster Generator"
 
 
 
21
  ).launch(share=True)
 
9
  image = pipe(prompt).images[0]
10
  return image
11
 
12
+ import os
13
+
14
+ HF_TOKEN = os.getenv('sai')
15
+ hf_writer = gr.HuggingFaceDatasetSaver(HF_TOKEN, "movie-poster")
16
+
17
  gr.Interface(
18
  fn = generate,
19
  inputs=[
 
22
  gr.inputs.Textbox(label="Setting")
23
  ],
24
  outputs= gr.outputs.Image(label="Generated movie poster",type='pil'),
25
+ title="Movie Poster Generator" ,
26
+ allow_flagging="manual",
27
+ flagging_options=["Good", "Better", "Worst"],
28
+ flagging_callback=hf_writer
29
  ).launch(share=True)