Spaces:
Sleeping
Sleeping
Commit
•
cfb14fd
1
Parent(s):
35c898d
new hf api
Browse files
app.py
CHANGED
@@ -7,10 +7,10 @@ def authenticate(username, password):
|
|
7 |
else:
|
8 |
return False
|
9 |
|
10 |
-
def predict(
|
11 |
-
response = requests.get(f"
|
12 |
return str(response.text)
|
13 |
|
14 |
-
iface = gr.Interface(fn=predict, inputs=["text"
|
15 |
iface.launch(auth=authenticate)
|
16 |
|
|
|
7 |
else:
|
8 |
return False
|
9 |
|
10 |
+
def predict(query):
|
11 |
+
response = requests.get(f"https://pbrenotvinciguerra-corte-api.hf.space/generate?query={query}")
|
12 |
return str(response.text)
|
13 |
|
14 |
+
iface = gr.Interface(fn=predict, inputs=["text"], outputs="text")
|
15 |
iface.launch(auth=authenticate)
|
16 |
|