auth2 / app.py
abidlabs's picture
abidlabs HF staff
Update app.py
4b5fdf7 verified
raw
history blame contribute delete
392 Bytes
import gradio as gr
def func(file_obj) -> str:
return file_obj
def auth(username: str, passwd: str) -> bool:
return username == "tom" and passwd == "tom"
def main():
demo = gr.Interface(
fn=func,
inputs=[gr.File()],
outputs=[gr.File()],
)
demo.queue(api_open=True)
demo.launch(
auth=auth,
)
if __name__ == "__main__":
main()