File size: 456 Bytes
5992448
ab19b96
5992448
9f19b7a
 
 
 
 
 
cfb14fd
 
ab19b96
5992448
cfb14fd
35c898d
5992448
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
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)