pbrenotvinciguerra commited on
Commit
9f19b7a
1 Parent(s): ab19b96
Files changed (1) hide show
  1. app.py +8 -2
app.py CHANGED
@@ -1,10 +1,16 @@
1
  import gradio as gr
2
  import requests
3
 
4
- def greet(url, query):
 
 
 
 
 
 
5
  response = requests.get(f"{url}generate?query={query}")
6
  return str(response.text)
7
 
8
- iface = gr.Interface(fn=greet, inputs=["text","text"], outputs="text")
9
  iface.launch()
10
 
 
1
  import gradio as gr
2
  import requests
3
 
4
+ def authenticate(username, password):
5
+ if username == "Gribouille" and password == "A jamais les premiers":
6
+ return True
7
+ else:
8
+ return False
9
+
10
+ def predict(url, query):
11
  response = requests.get(f"{url}generate?query={query}")
12
  return str(response.text)
13
 
14
+ iface = gr.Interface(fn=predict, inputs=["text","text"], outputs="text")
15
  iface.launch()
16