sam133 commited on
Commit
fbfc887
·
1 Parent(s): ca1c22f

� PHASE 2 STEP 1: Add static components (HTML + Markdown)

Browse files

✅ Added back from original app:
- gr.HTML with custom styling
- Multiple gr.Markdown components
- Custom CSS
- gr.themes.Soft()

Testing: Static components should be completely safe

Files changed (1) hide show
  1. app.py +50 -11
app.py CHANGED
@@ -1,7 +1,7 @@
1
  #!/usr/bin/env python3
2
  """
3
- Agent2Robot - Minimal Test App
4
- Systematic Debugging - Phase 1
5
  """
6
 
7
  import gradio as gr
@@ -13,11 +13,41 @@ def dummy_function(name):
13
  return f"Hello {name}! The basic Gradio app is working."
14
 
15
  def create_minimal_app():
16
- """Create minimal Gradio interface for testing"""
17
- with gr.Blocks(title="Agent2Robot - Minimal Test") as demo:
18
- gr.Markdown("# 🔧 Agent2Robot - Minimal Test App")
19
- gr.Markdown("**Phase 1: Testing basic Gradio functionality**")
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
20
 
 
 
 
 
 
21
  with gr.Row():
22
  with gr.Column():
23
  inp = gr.Textbox(
@@ -35,15 +65,24 @@ def create_minimal_app():
35
 
36
  btn.click(fn=dummy_function, inputs=inp, outputs=out)
37
 
 
 
 
 
 
 
 
 
 
38
  gr.Markdown("---")
39
- gr.Markdown("**Status**: If you see this page, basic Gradio components are working correctly.")
40
 
41
  return demo
42
 
43
  if __name__ == "__main__":
44
- print("🔧 Agent2Robot - Minimal Test App")
45
  print("=" * 50)
46
- print("🚀 Testing basic Gradio functionality...")
47
 
48
  try:
49
  app = create_minimal_app()
@@ -56,5 +95,5 @@ if __name__ == "__main__":
56
  quiet=False
57
  )
58
  except Exception as e:
59
- print(f"❌ Error launching minimal app: {e}")
60
- print("Basic Gradio functionality is failing.")
 
1
  #!/usr/bin/env python3
2
  """
3
+ Agent2Robot - Phase 2 Step 1: Adding Static Components
4
+ Systematic Debugging - Adding HTML & Markdown
5
  """
6
 
7
  import gradio as gr
 
13
  return f"Hello {name}! The basic Gradio app is working."
14
 
15
  def create_minimal_app():
16
+ """Create minimal Gradio interface for testing - Step 1: Static Components"""
17
+
18
+ # Custom CSS for better appearance (from original)
19
+ custom_css = """
20
+ .main-header {
21
+ text-align: center;
22
+ background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
23
+ color: white;
24
+ padding: 30px;
25
+ border-radius: 15px;
26
+ margin-bottom: 20px;
27
+ box-shadow: 0 8px 16px rgba(0,0,0,0.1);
28
+ }
29
+ """
30
+
31
+ with gr.Blocks(
32
+ title="🤖🚁 Agent2Robot - Phase 2 Step 1",
33
+ theme=gr.themes.Soft(),
34
+ css=custom_css
35
+ ) as demo:
36
+
37
+ # Header Section (from original)
38
+ gr.HTML("""
39
+ <div class="main-header">
40
+ <h1>🤖🚁 Agent2Robot</h1>
41
+ <h2>Phase 2 Step 1: Static Components Test</h2>
42
+ <p><strong>Adding back HTML and Markdown components</strong></p>
43
+ </div>
44
+ """)
45
 
46
+ # Static Markdown (from original)
47
+ gr.Markdown("## 🔧 Phase 2: Systematic Component Testing")
48
+ gr.Markdown("**Step 1**: Testing static HTML and Markdown components")
49
+
50
+ # Basic functionality test (minimal)
51
  with gr.Row():
52
  with gr.Column():
53
  inp = gr.Textbox(
 
65
 
66
  btn.click(fn=dummy_function, inputs=inp, outputs=out)
67
 
68
+ # More static content (from original)
69
+ gr.Markdown("---")
70
+ gr.Markdown("""
71
+ ### 📋 Environment Info (Static Test)
72
+ - **Test Phase**: Phase 2 Step 1
73
+ - **Components Added**: HTML, Markdown
74
+ - **Status**: Testing static components
75
+ """)
76
+
77
  gr.Markdown("---")
78
+ gr.Markdown("**Status**: If you see this page with styling, static components work correctly.")
79
 
80
  return demo
81
 
82
  if __name__ == "__main__":
83
+ print("🔧 Agent2Robot - Phase 2 Step 1")
84
  print("=" * 50)
85
+ print("🚀 Testing static components...")
86
 
87
  try:
88
  app = create_minimal_app()
 
95
  quiet=False
96
  )
97
  except Exception as e:
98
+ print(f"❌ Error launching app: {e}")
99
+ print("Static components are causing issues.")