Spaces:
Paused
Paused
Update app.py
Browse files
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()
|