Download app.py from powolnik/t2v: direct link, hf CLI and curl.
- Browser
- Download file 621 Bytes
-
https://huggingface.co/spaces/powolnik/t2v/resolve/main/app.py
- Command line
-
hf download hf://spaces/powolnik/t2v/app.py
-
curl -L -o app.py https://huggingface.co/spaces/powolnik/t2v/resolve/main/app.py
621 Bytes
| import gradio as gr | |
| def greet_user(name): | |
| """Function to greet the user with their name""" | |
| if name.strip(): | |
| return f"Hello, {name}! Nice to meet you!" | |
| else: | |
| return "Hello! Please enter your name to get a personalized greeting." | |
| # Create the Gradio interface | |
| interface = gr.Interface( | |
| fn=greet_user, | |
| inputs=gr.Textbox(label="Enter your name", placeholder="Type your name here..."), | |
| outputs=gr.Textbox(label="Greeting"), | |
| title="AI Greeter", | |
| description="Enter your name and I'll give you a friendly greeting!" | |
| ) | |
| if __name__ == "__main__": | |
| interface.launch(share=True) | |