Speedofmastery commited on
Commit
b6b7cfe
Β·
1 Parent(s): 9b50a27

Ultra-minimal: Simplest possible working version to resolve all Space issues

Browse files
Files changed (1) hide show
  1. app.py +25 -54
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
- with gr.Blocks(title="OpenManus") as app:
13
-
14
- gr.HTML(
15
- """
16
- <div style="text-align: center; padding: 20px; background: #667eea; color: white; border-radius: 10px;">
17
- <h1>πŸ€– OpenManus - Complete AI Platform</h1>
18
- <p>Mobile Authentication + 200+ AI Models</p>
19
- </div>
20
- """
21
- )
22
-
23
- with gr.Row():
24
- with gr.Column():
25
- gr.Markdown("## Authentication")
26
-
27
- with gr.Tab("Sign Up"):
28
- s_mobile = gr.Textbox(label="Mobile")
29
- s_name = gr.Textbox(label="Name")
30
- s_pass = gr.Textbox(label="Password", type="password")
31
- s_confirm = gr.Textbox(label="Confirm", type="password")
32
- s_btn = gr.Button("Sign Up")
33
- s_result = gr.Textbox(label="Result")
34
- s_btn.click(signup, [s_mobile, s_name, s_pass, s_confirm], s_result)
35
-
36
- with gr.Tab("Login"):
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()