Upload app_test.py with huggingface_hub
Browse files- app_test.py +25 -0
app_test.py
ADDED
@@ -0,0 +1,25 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
#!/usr/bin/env python3
|
2 |
+
"""
|
3 |
+
Simple test app for Hugging Face Space
|
4 |
+
"""
|
5 |
+
|
6 |
+
import gradio as gr
|
7 |
+
|
8 |
+
def hello_world(name):
|
9 |
+
return f"Hello {name}! OpenLLM Space is working!"
|
10 |
+
|
11 |
+
# Create a simple interface
|
12 |
+
with gr.Blocks(title="OpenLLM Test") as demo:
|
13 |
+
gr.Markdown("# 🚀 OpenLLM Test Space")
|
14 |
+
gr.Markdown("This is a simple test to verify the space is working.")
|
15 |
+
|
16 |
+
name_input = gr.Textbox(label="Enter your name", placeholder="Your name")
|
17 |
+
output = gr.Textbox(label="Output")
|
18 |
+
|
19 |
+
def greet(name):
|
20 |
+
return hello_world(name)
|
21 |
+
|
22 |
+
name_input.change(fn=greet, inputs=name_input, outputs=output)
|
23 |
+
|
24 |
+
if __name__ == "__main__":
|
25 |
+
demo.launch()
|