Spaces:
Configuration error
Configuration error
| 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() | |