Spaces:
Paused
Paused
Download app.py from amit0987/try_hf_space: direct link, hf CLI and curl.
- Browser
- Download file 323 Bytes
-
https://huggingface.co/spaces/amit0987/try_hf_space/resolve/main/app.py
- Command line
-
hf download hf://spaces/amit0987/try_hf_space/app.py
-
curl -L -o app.py https://huggingface.co/spaces/amit0987/try_hf_space/resolve/main/app.py
323 Bytes
| import gradio as gr | |
| import temp_app | |
| def greet(name): | |
| is_valid_name, validated_name = temp_app.validate_name(name) | |
| if is_valid_name: | |
| return validated_name | |
| else: | |
| return f"Hello, {name}!" | |
| app = gr.Interface(fn=greet, inputs="text", outputs="text") | |
| if __name__ == "__main__": | |
| app.launch() | |