File size: 687 Bytes
cc3ab4e
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
#!/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()