llm / app_test.py
lemms's picture
Upload app_test.py with huggingface_hub
cc3ab4e verified
raw
history blame contribute delete
687 Bytes
#!/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()