Spaces:
Paused
Paused
Adding specific label
Browse files
app.py
CHANGED
@@ -87,7 +87,7 @@ def check_if_exist(bucket_name, key):
|
|
87 |
return True
|
88 |
|
89 |
|
90 |
-
def list_s3_files(
|
91 |
|
92 |
s3_client = boto3.client('s3',
|
93 |
aws_access_key_id=AWS_ACCESS_KEY_ID,
|
@@ -124,5 +124,17 @@ def list_s3_files(bucket_name, folder):
|
|
124 |
sleep(500/1000)
|
125 |
|
126 |
|
127 |
-
|
128 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
87 |
return True
|
88 |
|
89 |
|
90 |
+
def list_s3_files():
|
91 |
|
92 |
s3_client = boto3.client('s3',
|
93 |
aws_access_key_id=AWS_ACCESS_KEY_ID,
|
|
|
124 |
sleep(500/1000)
|
125 |
|
126 |
|
127 |
+
demo = gr.Blocks()
|
128 |
+
|
129 |
+
with demo:
|
130 |
+
|
131 |
+
text = gr.Textbox()
|
132 |
+
|
133 |
+
bimage = gr.Button("Generate Blog Images for PineSearch!")
|
134 |
+
|
135 |
+
bimage.click(list_s3_files, outputs=text)
|
136 |
+
|
137 |
+
demo.launch()
|
138 |
+
|
139 |
+
# iface = gr.Interface(fn=list_s3_files, inputs=[Textbox(label="bucket_name"), Textbox(label="folder")], outputs="text")
|
140 |
+
# iface.launch()
|