| #!/usr/bin/env python3 | |
| """ | |
| Simple test app for Hugging Face Space | |
| """ | |
| import gradio as gr | |
| def hello_world(name): | |
| return f"Hello {name}! OpenLLM Space is working!" | |
| # Create a simple interface | |
| with gr.Blocks(title="OpenLLM Test") as demo: | |
| gr.Markdown("# ๐ OpenLLM Test Space") | |
| gr.Markdown("This is a simple test to verify the space is working.") | |
| name_input = gr.Textbox(label="Enter your name", placeholder="Your name") | |
| output = gr.Textbox(label="Output") | |
| def greet(name): | |
| return hello_world(name) | |
| name_input.change(fn=greet, inputs=name_input, outputs=output) | |
| if __name__ == "__main__": | |
| demo.launch() | |