Spaces:
Configuration error
Configuration error
File size: 1,005 Bytes
8e1cd5e |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 |
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()
|