Spaces:
Sleeping
Sleeping
File size: 495 Bytes
7378a57 014d469 7378a57 147156d |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 |
import gradio as gr
import dotenv
import os
dotenv.load_dotenv()
PW=os.getenv("PW")
def greet(name, request: gr.Request):
print(request.username)
return "Hello " + name + "!"
with gr.Blocks() as demo:
name = gr.Textbox(label="Name")
output = gr.Textbox(label="Output Box")
greet_btn = gr.Button("Greet")
greet_btn.click(fn=greet, inputs=name, outputs=output, api_name="greet")
demo.launch(auth=[("kerem", PW), ("kerem2", PW)],favicon_path="D:/dev/eso/tugra_logo.jpg") |