Ben Beinke commited on
Commit
1b6a051
·
1 Parent(s): d8b2921

fixed claudes mess

Browse files
Files changed (2) hide show
  1. README.md +2 -116
  2. app.py +13 -29
README.md CHANGED
@@ -1,119 +1,5 @@
1
  # 💗Likable
2
  It's almost Lovable - Build Gradio apps, using only a chat interface.
3
 
4
- ## 🚀 Features
5
-
6
- - **Chat Interface**: Natural language conversation with AI to describe what you want to build
7
- - **Live Preview**: See your generated application in real-time
8
- - **Code View**: Toggle to view the generated Python/Gradio code
9
- - **Example Prompts**: Get started quickly with pre-built examples
10
- - **Modern UI**: Clean, responsive interface inspired by Lovable
11
-
12
- ## 🛠️ Setup
13
-
14
- ### Prerequisites
15
- - Python 3.8+
16
- - pip or uv for package management
17
-
18
- ### Installation
19
-
20
- Using uv (recommended):
21
- ```bash
22
- uv sync
23
- ```
24
-
25
- Or using pip:
26
- ```bash
27
- pip install -r requirements.txt
28
- ```
29
-
30
- ### Running the Application
31
-
32
- ```bash
33
- python app.py
34
- ```
35
-
36
- Or use the launcher:
37
- ```bash
38
- python run.py
39
- ```
40
-
41
- The application will be available at `http://localhost:7860`
42
-
43
- ## 🎯 Usage
44
-
45
- 1. **Start a Conversation**: Type what you want to build in the chat interface
46
- 2. **View Results**: See the generated app preview on the right
47
- 3. **Toggle Views**: Switch between "Preview" and "Code" to see the implementation
48
- 4. **Iterate**: Continue chatting to refine and improve your application
49
-
50
- ### Example Prompts
51
- - "Create a simple todo app"
52
- - "Build a calculator interface"
53
- - "Make a weather dashboard"
54
- - "Design a photo gallery"
55
- - "Create a chat interface"
56
-
57
- ## 🏗️ Architecture
58
-
59
- ### Components
60
- - **Chat Interface** (Left Panel)
61
- - AI-powered conversation
62
- - Example prompts
63
- - Message history
64
-
65
- - **Preview/Code Panel** (Right Panel)
66
- - Live HTML preview of generated apps
67
- - Syntax-highlighted code view
68
- - Toggle between views
69
-
70
- ### Tech Stack
71
- - **Gradio**: Web UI framework
72
- - **Python**: Backend logic
73
- - **HTML/CSS**: Preview rendering
74
-
75
- ## 🔮 Roadmap
76
-
77
- ### Planned Features
78
- - [ ] **Real AI Integration**: Connect to actual LLM APIs
79
- - [ ] **Code Execution**: Run generated code in sandbox (E2B integration)
80
- - [ ] **HuggingFace Deployment**: One-click deployment to HF Spaces
81
- - [ ] **Advanced Agents**:
82
- - [ ] Planner Agent (architecture decisions)
83
- - [ ] Coder Agent (file management, diff editing)
84
- - [ ] Reviewer Agent (visual testing)
85
- - [ ] **File Management**:
86
- - [ ] Read/write/edit files
87
- - [ ] Project structure management
88
- - [ ] Git integration
89
- - [ ] **Enhanced Preview**:
90
- - [ ] Real Gradio app embedding
91
- - [ ] Interactive previews
92
- - [ ] Mobile responsive testing
93
-
94
- ### Current Status
95
- ✅ Basic UI layout
96
- ✅ Chat interface mockup
97
- ✅ Preview/Code toggle
98
- ✅ Example system
99
- 🚧 AI integration (mock responses)
100
- 🚧 Real code generation
101
- 🚧 Live app deployment
102
-
103
- ## 🤝 Contributing
104
-
105
- 1. Fork the repository
106
- 2. Create a feature branch
107
- 3. Make your changes
108
- 4. Test thoroughly
109
- 5. Submit a pull request
110
-
111
- ## 📄 License
112
-
113
- MIT License - see LICENSE file for details
114
-
115
- ## 🙏 Acknowledgments
116
-
117
- - Inspired by [Lovable](https://lovable.dev/) - the AI-powered web app builder
118
- - Built with [Gradio](https://gradio.app/) - the fastest way to build ML demos
119
- - UI design patterns from modern development tools
 
1
  # 💗Likable
2
  It's almost Lovable - Build Gradio apps, using only a chat interface.
3
 
4
+ ## Notes
5
+ - Use as little custom css as possible!!!
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
app.py CHANGED
@@ -97,32 +97,18 @@ def create_lovable_ui():
97
  with gr.Blocks(
98
  title="💗Likable",
99
  theme=gr.themes.Soft(),
100
- css="""
101
- .main-container {
102
- height: 100vh;
103
- }
104
- .chat-container {
105
- height: 80vh;
106
- border-right: 1px solid #e0e0e0;
107
- }
108
- .content-container {
109
- height: 80vh;
110
- }
111
- """,
112
  ) as demo:
113
  gr.Markdown("# 💗Likable")
114
- gr.Markdown(
115
- "*It's almost Lovable - Build Gradio apps using only a chat interface*"
116
- )
117
 
118
  with gr.Tabs():
119
  # Preview Tab
120
  with gr.TabItem("Preview"):
121
- with gr.Row(elem_classes="main-container"):
122
  # Left side - Chat Interface
123
  with gr.Column(scale=1, elem_classes="chat-container"):
124
- gr.Markdown("### 💬 Chat with AI")
125
-
126
  chatbot_preview = gr.Chatbot(
127
  height=500,
128
  show_copy_button=True,
@@ -142,20 +128,18 @@ def create_lovable_ui():
142
 
143
  # Right side - Preview Content
144
  with gr.Column(scale=4, elem_classes="content-container"):
145
- with gr.Row():
146
- gr.Button(
147
- "Deploy to HF Spaces", variant="secondary", scale=1
148
- )
149
 
150
  preview_html = gr.HTML(value=get_preview_content())
151
 
152
  # Code Tab
153
  with gr.TabItem("Code"):
154
- with gr.Row(elem_classes="main-container"):
155
  # Left side - Chat Interface
156
  with gr.Column(scale=1, elem_classes="chat-container"):
157
- gr.Markdown("### 💬 Chat with AI")
158
-
159
  chatbot_code = gr.Chatbot(
160
  height=500,
161
  show_copy_button=True,
@@ -175,10 +159,10 @@ def create_lovable_ui():
175
 
176
  # Right side - Code Content
177
  with gr.Column(scale=4, elem_classes="content-container"):
178
- with gr.Row():
179
- gr.Button(
180
- "Deploy to HF Spaces", variant="secondary", scale=1
181
- )
182
 
183
  code_view = gr.Code(
184
  value=get_code_content(),
 
97
  with gr.Blocks(
98
  title="💗Likable",
99
  theme=gr.themes.Soft(),
 
 
 
 
 
 
 
 
 
 
 
 
100
  ) as demo:
101
  gr.Markdown("# 💗Likable")
102
+ # gr.Markdown(
103
+ # "*It's almost Lovable - Build Gradio apps using only a chat interface*"
104
+ # )
105
 
106
  with gr.Tabs():
107
  # Preview Tab
108
  with gr.TabItem("Preview"):
109
+ with gr.Row(elem_classes="main-container", equal_height=True):
110
  # Left side - Chat Interface
111
  with gr.Column(scale=1, elem_classes="chat-container"):
 
 
112
  chatbot_preview = gr.Chatbot(
113
  height=500,
114
  show_copy_button=True,
 
128
 
129
  # Right side - Preview Content
130
  with gr.Column(scale=4, elem_classes="content-container"):
131
+ # with gr.Row():
132
+ # gr.Button(
133
+ # "Deploy to HF Spaces", variant="secondary", scale=1
134
+ # )
135
 
136
  preview_html = gr.HTML(value=get_preview_content())
137
 
138
  # Code Tab
139
  with gr.TabItem("Code"):
140
+ with gr.Row(elem_classes="main-container", equal_height=True):
141
  # Left side - Chat Interface
142
  with gr.Column(scale=1, elem_classes="chat-container"):
 
 
143
  chatbot_code = gr.Chatbot(
144
  height=500,
145
  show_copy_button=True,
 
159
 
160
  # Right side - Code Content
161
  with gr.Column(scale=4, elem_classes="content-container"):
162
+ # with gr.Row():
163
+ # gr.Button(
164
+ # "Deploy to HF Spaces", variant="secondary", scale=1
165
+ # )
166
 
167
  code_view = gr.Code(
168
  value=get_code_content(),