Spaces:
Sleeping
Sleeping
one small step for us--added Dennett labs ui and logo!
Browse files
app.py
ADDED
|
@@ -0,0 +1,24 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
import gradio as gr
|
| 2 |
+
|
| 3 |
+
def dennett_greeting(name):
|
| 4 |
+
if name.strip() == "":
|
| 5 |
+
return "System waiting for input..."
|
| 6 |
+
return f"Access granted. Welcome to the sandbox, {name}."
|
| 7 |
+
|
| 8 |
+
# We use gr.Blocks to create a custom, hacker-style layout
|
| 9 |
+
with gr.Blocks(theme=gr.themes.Monochrome()) as demo:
|
| 10 |
+
# Here is your Logo and Header!
|
| 11 |
+
gr.Markdown("# 🟩Δ DENNETT LABS")
|
| 12 |
+
gr.Markdown("### Project: FirstBlood | Status: Online")
|
| 13 |
+
gr.Markdown("---")
|
| 14 |
+
|
| 15 |
+
with gr.Row():
|
| 16 |
+
name_input = gr.Textbox(label="Identify Yourself", placeholder="Enter your name...")
|
| 17 |
+
greeting_output = gr.Textbox(label="System Response", interactive=False)
|
| 18 |
+
|
| 19 |
+
greet_btn = gr.Button("Initialize")
|
| 20 |
+
|
| 21 |
+
# When the button is clicked, run the function
|
| 22 |
+
greet_btn.click(fn=dennett_greeting, inputs=name_input, outputs=greeting_output)
|
| 23 |
+
|
| 24 |
+
demo.launch()
|