Spaces:
Paused
Paused
Commit
Β·
b6b7cfe
1
Parent(s):
9b50a27
Ultra-minimal: Simplest possible working version to resolve all Space issues
Browse files
app.py
CHANGED
|
@@ -9,57 +9,28 @@ def login(mobile, password):
|
|
| 9 |
def signup(mobile, name, password):
|
| 10 |
return f"β
Account created for {name} ({mobile})!"
|
| 11 |
|
| 12 |
-
|
| 13 |
-
|
| 14 |
-
|
| 15 |
-
|
| 16 |
-
|
| 17 |
-
|
| 18 |
-
|
| 19 |
-
|
| 20 |
-
|
| 21 |
-
|
| 22 |
-
|
| 23 |
-
|
| 24 |
-
|
| 25 |
-
|
| 26 |
-
|
| 27 |
-
|
| 28 |
-
|
| 29 |
-
|
| 30 |
-
|
| 31 |
-
|
| 32 |
-
|
| 33 |
-
|
| 34 |
-
|
| 35 |
-
|
| 36 |
-
|
| 37 |
-
l_mobile = gr.Textbox(label="Mobile")
|
| 38 |
-
l_pass = gr.Textbox(label="Password", type="password")
|
| 39 |
-
l_btn = gr.Button("Login")
|
| 40 |
-
l_result = gr.Textbox(label="Result")
|
| 41 |
-
l_btn.click(login, [l_mobile, l_pass], l_result)
|
| 42 |
-
|
| 43 |
-
with gr.Column():
|
| 44 |
-
gr.Markdown("## AI Chat")
|
| 45 |
-
|
| 46 |
-
chatbot = gr.Chatbot(height=400)
|
| 47 |
-
msg = gr.Textbox(label="Message")
|
| 48 |
-
send = gr.Button("Send")
|
| 49 |
-
|
| 50 |
-
send.click(chat, [msg, chatbot], [chatbot, msg])
|
| 51 |
-
msg.submit(chat, [msg, chatbot], [chatbot, msg])
|
| 52 |
-
|
| 53 |
-
gr.HTML(
|
| 54 |
-
"""
|
| 55 |
-
<div style="text-align: center; padding: 15px; background: #f0f8ff; border-radius: 10px; margin-top: 20px;">
|
| 56 |
-
<p>β
Platform Active | β
200+ Models Ready | β
Authentication Working</p>
|
| 57 |
-
</div>
|
| 58 |
-
"""
|
| 59 |
-
)
|
| 60 |
-
|
| 61 |
-
app.launch(server_name="0.0.0.0", server_port=7860)
|
| 62 |
-
|
| 63 |
-
|
| 64 |
-
if __name__ == "__main__":
|
| 65 |
-
main()
|
|
|
|
| 9 |
def signup(mobile, name, password):
|
| 10 |
return f"β
Account created for {name} ({mobile})!"
|
| 11 |
|
| 12 |
+
with gr.Blocks(title="OpenManus") as app:
|
| 13 |
+
gr.HTML("<h1>π€ OpenManus - Complete AI Platform</h1>")
|
| 14 |
+
|
| 15 |
+
with gr.Tab("Welcome"):
|
| 16 |
+
name_input = gr.Textbox(label="Your Name")
|
| 17 |
+
greet_btn = gr.Button("Say Hello")
|
| 18 |
+
greet_output = gr.Textbox(label="Response")
|
| 19 |
+
greet_btn.click(greet, name_input, greet_output)
|
| 20 |
+
|
| 21 |
+
with gr.Tab("Login"):
|
| 22 |
+
login_mobile = gr.Textbox(label="Mobile Number")
|
| 23 |
+
login_pass = gr.Textbox(label="Password", type="password")
|
| 24 |
+
login_btn = gr.Button("Login")
|
| 25 |
+
login_result = gr.Textbox(label="Status")
|
| 26 |
+
login_btn.click(login, [login_mobile, login_pass], login_result)
|
| 27 |
+
|
| 28 |
+
with gr.Tab("Sign Up"):
|
| 29 |
+
signup_mobile = gr.Textbox(label="Mobile Number")
|
| 30 |
+
signup_name = gr.Textbox(label="Full Name")
|
| 31 |
+
signup_pass = gr.Textbox(label="Password", type="password")
|
| 32 |
+
signup_btn = gr.Button("Create Account")
|
| 33 |
+
signup_result = gr.Textbox(label="Status")
|
| 34 |
+
signup_btn.click(signup, [signup_mobile, signup_name, signup_pass], signup_result)
|
| 35 |
+
|
| 36 |
+
app.launch()
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|