mirror of
https://github.com/gradio-app/gradio.git
synced 2025-03-31 12:20:26 +08:00
fix auth clearing error
This commit is contained in:
parent
e6c982250e
commit
d1f124c6e4
11
demo/hello_world_test.py
Normal file
11
demo/hello_world_test.py
Normal file
@ -0,0 +1,11 @@
|
||||
import gradio as gr
|
||||
from random import choice
|
||||
|
||||
def greet(name):
|
||||
return "Hello " + name + "!!"
|
||||
|
||||
iface = gr.Interface(fn=greet, inputs="text", outputs="text")
|
||||
u, p = choice("qwerty"), choice("asdf")
|
||||
print(u, p)
|
||||
if __name__ == "__main__":
|
||||
iface.launch(auth=(u,p), share=True)
|
@ -127,7 +127,6 @@ def get_first_available_port(initial, final):
|
||||
@app.route("/", methods=["GET"])
|
||||
@login_check
|
||||
def main():
|
||||
session.clear()
|
||||
session["state"] = None
|
||||
return render_template("index.html", config=app.interface.config)
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user