corte / app.py
pbrenotvinciguerra's picture
new hf api
cfb14fd
raw
history blame
456 Bytes
import gradio as gr
import requests
def authenticate(username, password):
if username == "Gribouille" and password == "A jamais les premiers":
return True
else:
return False
def predict(query):
response = requests.get(f"https://pbrenotvinciguerra-corte-api.hf.space/generate?query={query}")
return str(response.text)
iface = gr.Interface(fn=predict, inputs=["text"], outputs="text")
iface.launch(auth=authenticate)