Spaces:
Configuration error
Configuration error
Download app.py from 121tester/test-space-commit-squashing: direct link, hf CLI and curl.
- Browser
- Download file 1.01 kB
-
https://huggingface.co/spaces/121tester/test-space-commit-squashing/resolve/main/app.py
- Command line
-
hf download hf://spaces/121tester/test-space-commit-squashing/app.py
-
curl -L -o app.py https://huggingface.co/spaces/121tester/test-space-commit-squashing/resolve/main/app.py
1.01 kB
| import gradio as gr | |
| def greet(name): | |
| """Simple greeting function.""" | |
| return f"Hello {name}! Welcome to the test space for commit squashing." | |
| def process_text(text): | |
| """Process and transform text.""" | |
| return text.upper() | |
| # Create Gradio interface | |
| with gr.Blocks() as demo: | |
| gr.Markdown("# Commit Squashing Test Application") | |
| gr.Markdown("This is a demo application for testing commit squashing.") | |
| with gr.Tab("Greeting"): | |
| name_input = gr.Textbox(label="Enter your name") | |
| greet_output = gr.Textbox(label="Greeting") | |
| greet_button = gr.Button("Greet") | |
| greet_button.click(greet, inputs=name_input, outputs=greet_output) | |
| with gr.Tab("Text Processor"): | |
| text_input = gr.Textbox(label="Enter text") | |
| text_output = gr.Textbox(label="Processed text") | |
| process_button = gr.Button("Process") | |
| process_button.click(process_text, inputs=text_input, outputs=text_output) | |
| if __name__ == "__main__": | |
| demo.launch() | |