SAUL19 commited on
Commit
cb460c0
·
1 Parent(s): 875b8bd

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +5 -2
app.py CHANGED
@@ -19,7 +19,10 @@ pipe = StableDiffusionPipeline.from_pretrained(
19
 
20
  pipe = pipe.to(device)
21
 
22
- def text_to_image(prompt, save_as):
 
 
 
23
 
24
  # Create an instance of the S3 client
25
  s3 = boto3.client('s3',
@@ -52,5 +55,5 @@ def text_to_image(prompt, save_as):
52
 
53
 
54
 
55
- iface = gr.Interface(fn=text_to_image, inputs=[Textbox(label="prompt"), Textbox(label="s3_save_as")], outputs="text")
56
  iface.launch()
 
19
 
20
  pipe = pipe.to(device)
21
 
22
+ def text_to_image(prompt, save_as, key_id):
23
+
24
+ if AWS_ACCESS_KEY_ID != key_id:
25
+ return "not permition"
26
 
27
  # Create an instance of the S3 client
28
  s3 = boto3.client('s3',
 
55
 
56
 
57
 
58
+ iface = gr.Interface(fn=text_to_image, inputs=[Textbox(label="prompt"), Textbox(label="s3_save_as"), Textbox(label="aws_key_id")], outputs="text")
59
  iface.launch()