leftattention's picture
Create app.py
1108f7c
import requests
import gradio as gr
def get_random_file_from_s3(input_txt, api_key):
url = "http://18.189.132.140:5218/run/predict"
response = requests.post(
url=url,
json={
"data": [
"abcd",
"J4g7Bv9Tm0A3Q6yZ"
]
}
).json()
file_url = response["data"][0]
return file_url
gr.Interface(
get_random_file_from_s3,
inputs=[
"text",
"text"
],
outputs=["text"]
).launch()