uhhjj / app_ultra_minimal.py
Speedofmastery's picture
Auto-commit: app_ultra_minimal.py updated
0be926c
raw
history blame
1.36 kB
import gradio as gr
def greet(name):
return f"Hello {name}! OpenManus Platform is running with 200+ AI models!"
def login(mobile, password):
return f"βœ… Login successful for {mobile}!"
def signup(mobile, name, password):
return f"βœ… Account created for {name} ({mobile})!"
with gr.Blocks(title="OpenManus") as app:
gr.HTML("<h1>πŸ€– OpenManus - Complete AI Platform</h1>")
with gr.Tab("Welcome"):
name_input = gr.Textbox(label="Your Name")
greet_btn = gr.Button("Say Hello")
greet_output = gr.Textbox(label="Response")
greet_btn.click(greet, name_input, greet_output)
with gr.Tab("Login"):
login_mobile = gr.Textbox(label="Mobile Number")
login_pass = gr.Textbox(label="Password", type="password")
login_btn = gr.Button("Login")
login_result = gr.Textbox(label="Status")
login_btn.click(login, [login_mobile, login_pass], login_result)
with gr.Tab("Sign Up"):
signup_mobile = gr.Textbox(label="Mobile Number")
signup_name = gr.Textbox(label="Full Name")
signup_pass = gr.Textbox(label="Password", type="password")
signup_btn = gr.Button("Create Account")
signup_result = gr.Textbox(label="Status")
signup_btn.click(signup, [signup_mobile, signup_name, signup_pass], signup_result)
app.launch()