Spaces:
Running
Running
Add 2 files
Browse files- README.md +7 -5
- index.html +544 -19
README.md
CHANGED
@@ -1,10 +1,12 @@
|
|
1 |
---
|
2 |
-
title:
|
3 |
-
emoji:
|
4 |
-
colorFrom:
|
5 |
-
colorTo:
|
6 |
sdk: static
|
7 |
pinned: false
|
|
|
|
|
8 |
---
|
9 |
|
10 |
-
Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference
|
|
|
1 |
---
|
2 |
+
title: ai-appbuilder
|
3 |
+
emoji: 🐳
|
4 |
+
colorFrom: yellow
|
5 |
+
colorTo: red
|
6 |
sdk: static
|
7 |
pinned: false
|
8 |
+
tags:
|
9 |
+
- deepsite
|
10 |
---
|
11 |
|
12 |
+
Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference
|
index.html
CHANGED
@@ -1,19 +1,544 @@
|
|
1 |
-
<!
|
2 |
-
<html>
|
3 |
-
|
4 |
-
|
5 |
-
|
6 |
-
|
7 |
-
|
8 |
-
|
9 |
-
|
10 |
-
|
11 |
-
|
12 |
-
|
13 |
-
|
14 |
-
|
15 |
-
|
16 |
-
|
17 |
-
|
18 |
-
|
19 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<!DOCTYPE html>
|
2 |
+
<html lang="en">
|
3 |
+
<head>
|
4 |
+
<meta charset="UTF-8">
|
5 |
+
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
6 |
+
<title>AI App Builder | Streamlit & Gradio Integration</title>
|
7 |
+
<script src="https://cdn.tailwindcss.com"></script>
|
8 |
+
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css">
|
9 |
+
<style>
|
10 |
+
.gradient-bg {
|
11 |
+
background: linear-gradient(135deg, #6e8efb, #a777e3);
|
12 |
+
}
|
13 |
+
.code-block {
|
14 |
+
font-family: 'Courier New', monospace;
|
15 |
+
background-color: #2d3748;
|
16 |
+
color: #f7fafc;
|
17 |
+
border-radius: 0.5rem;
|
18 |
+
padding: 1rem;
|
19 |
+
overflow-x: auto;
|
20 |
+
}
|
21 |
+
.model-card:hover {
|
22 |
+
transform: translateY(-5px);
|
23 |
+
box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
|
24 |
+
}
|
25 |
+
.preview-window {
|
26 |
+
background-color: #f8f9fa;
|
27 |
+
border: 1px solid #e2e8f0;
|
28 |
+
border-radius: 0.5rem;
|
29 |
+
min-height: 300px;
|
30 |
+
}
|
31 |
+
.tab-active {
|
32 |
+
border-bottom: 3px solid #6e8efb;
|
33 |
+
color: #6e8efb;
|
34 |
+
font-weight: 600;
|
35 |
+
}
|
36 |
+
</style>
|
37 |
+
</head>
|
38 |
+
<body class="bg-gray-50">
|
39 |
+
<!-- Navigation -->
|
40 |
+
<nav class="gradient-bg text-white shadow-lg">
|
41 |
+
<div class="container mx-auto px-6 py-4">
|
42 |
+
<div class="flex items-center justify-between">
|
43 |
+
<div class="flex items-center space-x-4">
|
44 |
+
<i class="fas fa-robot text-2xl"></i>
|
45 |
+
<span class="text-xl font-bold">AI App Builder</span>
|
46 |
+
</div>
|
47 |
+
<div class="hidden md:flex items-center space-x-8">
|
48 |
+
<a href="#" class="hover:text-gray-200">Features</a>
|
49 |
+
<a href="#" class="hover:text-gray-200">Templates</a>
|
50 |
+
<a href="#" class="hover:text-gray-200">Documentation</a>
|
51 |
+
<a href="#" class="hover:text-gray-200">Pricing</a>
|
52 |
+
</div>
|
53 |
+
<button class="bg-white text-purple-600 px-4 py-2 rounded-md font-medium hover:bg-gray-100 transition">
|
54 |
+
Get Started
|
55 |
+
</button>
|
56 |
+
</div>
|
57 |
+
</div>
|
58 |
+
</nav>
|
59 |
+
|
60 |
+
<!-- Hero Section -->
|
61 |
+
<section class="gradient-bg text-white py-20">
|
62 |
+
<div class="container mx-auto px-6 text-center">
|
63 |
+
<h1 class="text-4xl md:text-6xl font-bold mb-6">Build AI Apps in Minutes</h1>
|
64 |
+
<p class="text-xl md:text-2xl mb-8 max-w-3xl mx-auto">
|
65 |
+
Create stunning Streamlit and Gradio applications with our no-code builder and multi-model AI integration.
|
66 |
+
</p>
|
67 |
+
<div class="flex flex-col md:flex-row justify-center gap-4">
|
68 |
+
<button class="bg-white text-purple-600 px-8 py-3 rounded-md font-bold hover:bg-gray-100 transition">
|
69 |
+
Start Building <i class="fas fa-arrow-right ml-2"></i>
|
70 |
+
</button>
|
71 |
+
<button class="bg-transparent border-2 border-white px-8 py-3 rounded-md font-bold hover:bg-white hover:text-purple-600 transition">
|
72 |
+
Watch Demo
|
73 |
+
</button>
|
74 |
+
</div>
|
75 |
+
</div>
|
76 |
+
</section>
|
77 |
+
|
78 |
+
<!-- Main App Builder -->
|
79 |
+
<section class="py-16">
|
80 |
+
<div class="container mx-auto px-6">
|
81 |
+
<div class="flex flex-col lg:flex-row gap-8">
|
82 |
+
<!-- Left Panel - Controls -->
|
83 |
+
<div class="w-full lg:w-1/3 bg-white rounded-xl shadow-md p-6">
|
84 |
+
<h2 class="text-2xl font-bold mb-6 text-gray-800">App Configuration</h2>
|
85 |
+
|
86 |
+
<!-- Model Selection -->
|
87 |
+
<div class="mb-8">
|
88 |
+
<h3 class="text-lg font-semibold mb-4 text-gray-700">Select AI Model</h3>
|
89 |
+
<div class="grid grid-cols-2 gap-4">
|
90 |
+
<div class="model-card bg-gray-50 p-4 rounded-lg cursor-pointer transition border border-gray-200 hover:border-purple-300">
|
91 |
+
<div class="flex items-center mb-2">
|
92 |
+
<i class="fas fa-brain text-purple-500 mr-2"></i>
|
93 |
+
<span class="font-medium">GPT-4</span>
|
94 |
+
</div>
|
95 |
+
<p class="text-sm text-gray-600">Advanced text generation</p>
|
96 |
+
</div>
|
97 |
+
<div class="model-card bg-gray-50 p-4 rounded-lg cursor-pointer transition border border-gray-200 hover:border-purple-300">
|
98 |
+
<div class="flex items-center mb-2">
|
99 |
+
<i class="fas fa-eye text-blue-500 mr-2"></i>
|
100 |
+
<span class="font-medium">DALL·E 3</span>
|
101 |
+
</div>
|
102 |
+
<p class="text-sm text-gray-600">Image generation</p>
|
103 |
+
</div>
|
104 |
+
<div class="model-card bg-gray-50 p-4 rounded-lg cursor-pointer transition border border-gray-200 hover:border-purple-300">
|
105 |
+
<div class="flex items-center mb-2">
|
106 |
+
<i class="fas fa-comments text-green-500 mr-2"></i>
|
107 |
+
<span class="font-medium">Claude 2</span>
|
108 |
+
</div>
|
109 |
+
<p class="text-sm text-gray-600">Conversational AI</p>
|
110 |
+
</div>
|
111 |
+
<div class="model-card bg-gray-50 p-4 rounded-lg cursor-pointer transition border border-gray-200 hover:border-purple-300">
|
112 |
+
<div class="flex items-center mb-2">
|
113 |
+
<i class="fas fa-microphone text-red-500 mr-2"></i>
|
114 |
+
<span class="font-medium">Whisper</span>
|
115 |
+
</div>
|
116 |
+
<p class="text-sm text-gray-600">Speech recognition</p>
|
117 |
+
</div>
|
118 |
+
</div>
|
119 |
+
</div>
|
120 |
+
|
121 |
+
<!-- Framework Selection -->
|
122 |
+
<div class="mb-8">
|
123 |
+
<h3 class="text-lg font-semibold mb-4 text-gray-700">App Framework</h3>
|
124 |
+
<div class="flex space-x-4">
|
125 |
+
<button id="streamlit-btn" class="framework-btn px-4 py-2 rounded-md bg-purple-100 text-purple-700 font-medium">
|
126 |
+
<i class="fab fa-python mr-2"></i> Streamlit
|
127 |
+
</button>
|
128 |
+
<button id="gradio-btn" class="framework-btn px-4 py-2 rounded-md bg-gray-200 text-gray-700 font-medium">
|
129 |
+
<i class="fas fa-sliders-h mr-2"></i> Gradio
|
130 |
+
</button>
|
131 |
+
</div>
|
132 |
+
</div>
|
133 |
+
|
134 |
+
<!-- Input Components -->
|
135 |
+
<div class="mb-8">
|
136 |
+
<h3 class="text-lg font-semibold mb-4 text-gray-700">Input Components</h3>
|
137 |
+
<div class="grid grid-cols-3 gap-2">
|
138 |
+
<div class="component-btn p-2 bg-gray-100 rounded text-center cursor-pointer hover:bg-purple-100">
|
139 |
+
<i class="fas fa-font block text-lg mb-1"></i>
|
140 |
+
<span class="text-xs">Text</span>
|
141 |
+
</div>
|
142 |
+
<div class="component-btn p-2 bg-gray-100 rounded text-center cursor-pointer hover:bg-purple-100">
|
143 |
+
<i class="fas fa-image block text-lg mb-1"></i>
|
144 |
+
<span class="text-xs">Image</span>
|
145 |
+
</div>
|
146 |
+
<div class="component-btn p-2 bg-gray-100 rounded text-center cursor-pointer hover:bg-purple-100">
|
147 |
+
<i class="fas fa-file-upload block text-lg mb-1"></i>
|
148 |
+
<span class="text-xs">File</span>
|
149 |
+
</div>
|
150 |
+
<div class="component-btn p-2 bg-gray-100 rounded text-center cursor-pointer hover:bg-purple-100">
|
151 |
+
<i class="fas fa-sliders-h block text-lg mb-1"></i>
|
152 |
+
<span class="text-xs">Slider</span>
|
153 |
+
</div>
|
154 |
+
<div class="component-btn p-2 bg-gray-100 rounded text-center cursor-pointer hover:bg-purple-100">
|
155 |
+
<i class="fas fa-check-square block text-lg mb-1"></i>
|
156 |
+
<span class="text-xs">Checkbox</span>
|
157 |
+
</div>
|
158 |
+
<div class="component-btn p-2 bg-gray-100 rounded text-center cursor-pointer hover:bg-purple-100">
|
159 |
+
<i class="fas fa-microphone block text-lg mb-1"></i>
|
160 |
+
<span class="text-xs">Audio</span>
|
161 |
+
</div>
|
162 |
+
</div>
|
163 |
+
</div>
|
164 |
+
|
165 |
+
<!-- App Settings -->
|
166 |
+
<div>
|
167 |
+
<h3 class="text-lg font-semibold mb-4 text-gray-700">App Settings</h3>
|
168 |
+
<div class="space-y-4">
|
169 |
+
<div>
|
170 |
+
<label class="block text-sm font-medium text-gray-700 mb-1">App Title</label>
|
171 |
+
<input type="text" class="w-full px-3 py-2 border border-gray-300 rounded-md" placeholder="My AI App">
|
172 |
+
</div>
|
173 |
+
<div>
|
174 |
+
<label class="block text-sm font-medium text-gray-700 mb-1">Theme</label>
|
175 |
+
<select class="w-full px-3 py-2 border border-gray-300 rounded-md">
|
176 |
+
<option>Light</option>
|
177 |
+
<option>Dark</option>
|
178 |
+
<option>Custom</option>
|
179 |
+
</select>
|
180 |
+
</div>
|
181 |
+
<div class="flex items-center">
|
182 |
+
<input type="checkbox" id="shareable" class="mr-2">
|
183 |
+
<label for="shareable" class="text-sm text-gray-700">Make shareable</label>
|
184 |
+
</div>
|
185 |
+
</div>
|
186 |
+
</div>
|
187 |
+
</div>
|
188 |
+
|
189 |
+
<!-- Right Panel - Preview and Code -->
|
190 |
+
<div class="w-full lg:w-2/3">
|
191 |
+
<!-- Tabs -->
|
192 |
+
<div class="flex border-b border-gray-200 mb-6">
|
193 |
+
<button id="preview-tab" class="tab-btn px-4 py-2 font-medium text-gray-600 mr-2 tab-active">Live Preview</button>
|
194 |
+
<button id="code-tab" class="tab-btn px-4 py-2 font-medium text-gray-600 mr-2">Generated Code</button>
|
195 |
+
<button id="deploy-tab" class="tab-btn px-4 py-2 font-medium text-gray-600">Deployment</button>
|
196 |
+
</div>
|
197 |
+
|
198 |
+
<!-- Preview Window -->
|
199 |
+
<div id="preview-content" class="preview-window p-6 mb-6">
|
200 |
+
<h3 class="text-xl font-bold mb-4 text-gray-800">App Preview</h3>
|
201 |
+
<div class="bg-white p-6 rounded-lg shadow-sm">
|
202 |
+
<div class="mb-4">
|
203 |
+
<label class="block text-sm font-medium text-gray-700 mb-1">Enter your prompt</label>
|
204 |
+
<textarea class="w-full px-3 py-2 border border-gray-300 rounded-md" rows="3" placeholder="Type something..."></textarea>
|
205 |
+
</div>
|
206 |
+
<div class="flex justify-between">
|
207 |
+
<div class="flex space-x-2">
|
208 |
+
<button class="px-3 py-1 bg-gray-100 text-gray-700 rounded text-sm">Clear</button>
|
209 |
+
<button class="px-3 py-1 bg-gray-100 text-gray-700 rounded text-sm">Examples</button>
|
210 |
+
</div>
|
211 |
+
<button class="px-4 py-1 bg-purple-600 text-white rounded hover:bg-purple-700">Submit</button>
|
212 |
+
</div>
|
213 |
+
</div>
|
214 |
+
<div class="bg-white p-4 mt-4 rounded-lg shadow-sm">
|
215 |
+
<div class="flex items-center mb-2">
|
216 |
+
<div class="w-8 h-8 rounded-full bg-purple-100 flex items-center justify-center mr-2">
|
217 |
+
<i class="fas fa-robot text-purple-600"></i>
|
218 |
+
</div>
|
219 |
+
<span class="font-medium">AI Response</span>
|
220 |
+
</div>
|
221 |
+
<div class="text-gray-700">
|
222 |
+
<p>This is where the AI-generated response will appear. The output will change based on the model you've selected and the input you provide.</p>
|
223 |
+
</div>
|
224 |
+
</div>
|
225 |
+
</div>
|
226 |
+
|
227 |
+
<!-- Code Window (Hidden by default) -->
|
228 |
+
<div id="code-content" class="hidden code-block mb-6">
|
229 |
+
<div class="flex justify-between items-center mb-4">
|
230 |
+
<h3 class="text-lg font-medium">Generated Python Code</h3>
|
231 |
+
<button class="copy-btn px-3 py-1 bg-gray-700 text-white rounded text-sm hover:bg-gray-600">
|
232 |
+
<i class="fas fa-copy mr-1"></i> Copy
|
233 |
+
</button>
|
234 |
+
</div>
|
235 |
+
<pre id="generated-code">
|
236 |
+
import streamlit as st
|
237 |
+
from transformers import pipeline
|
238 |
+
|
239 |
+
# Set up the page
|
240 |
+
st.set_page_config(page_title="My AI App", layout="wide")
|
241 |
+
st.title("My AI App")
|
242 |
+
|
243 |
+
# Initialize the model
|
244 |
+
@st.cache_resource
|
245 |
+
def load_model():
|
246 |
+
return pipeline("text-generation", model="gpt2")
|
247 |
+
|
248 |
+
model = load_model()
|
249 |
+
|
250 |
+
# User input
|
251 |
+
user_input = st.text_area("Enter your prompt", placeholder="Type something...")
|
252 |
+
|
253 |
+
# Generate response
|
254 |
+
if st.button("Submit"):
|
255 |
+
if user_input:
|
256 |
+
with st.spinner("Generating response..."):
|
257 |
+
response = model(user_input, max_length=100, num_return_sequences=1)
|
258 |
+
st.write(response[0]['generated_text'])
|
259 |
+
else:
|
260 |
+
st.warning("Please enter a prompt")
|
261 |
+
</pre>
|
262 |
+
</div>
|
263 |
+
|
264 |
+
<!-- Deployment Window (Hidden by default) -->
|
265 |
+
<div id="deploy-content" class="hidden bg-white p-6 rounded-lg shadow-sm">
|
266 |
+
<h3 class="text-xl font-bold mb-4 text-gray-800">Deployment Options</h3>
|
267 |
+
<div class="grid md:grid-cols-3 gap-6">
|
268 |
+
<div class="border border-gray-200 rounded-lg p-4 hover:border-purple-300 transition">
|
269 |
+
<div class="flex items-center mb-3">
|
270 |
+
<i class="fas fa-cloud text-blue-500 text-xl mr-2"></i>
|
271 |
+
<h4 class="font-medium">Streamlit Cloud</h4>
|
272 |
+
</div>
|
273 |
+
<p class="text-sm text-gray-600 mb-3">Deploy directly to Streamlit's free hosting service.</p>
|
274 |
+
<button class="w-full py-2 bg-blue-100 text-blue-700 rounded text-sm font-medium hover:bg-blue-200">Deploy</button>
|
275 |
+
</div>
|
276 |
+
<div class="border border-gray-200 rounded-lg p-4 hover:border-purple-300 transition">
|
277 |
+
<div class="flex items-center mb-3">
|
278 |
+
<i class="fab fa-github text-gray-800 text-xl mr-2"></i>
|
279 |
+
<h4 class="font-medium">GitHub</h4>
|
280 |
+
</div>
|
281 |
+
<p class="text-sm text-gray-600 mb-3">Push to GitHub repository for CI/CD integration.</p>
|
282 |
+
<button class="w-full py-2 bg-gray-100 text-gray-800 rounded text-sm font-medium hover:bg-gray-200">Export</button>
|
283 |
+
</div>
|
284 |
+
<div class="border border-gray-200 rounded-lg p-4 hover:border-purple-300 transition">
|
285 |
+
<div class="flex items-center mb-3">
|
286 |
+
<i class="fas fa-download text-purple-500 text-xl mr-2"></i>
|
287 |
+
<h4 class="font-medium">Download</h4>
|
288 |
+
</div>
|
289 |
+
<p class="text-sm text-gray-600 mb-3">Download as Python file to run locally or elsewhere.</p>
|
290 |
+
<button class="w-full py-2 bg-purple-100 text-purple-700 rounded text-sm font-medium hover:bg-purple-200">Download</button>
|
291 |
+
</div>
|
292 |
+
</div>
|
293 |
+
<div class="mt-6 p-4 bg-yellow-50 rounded-lg border border-yellow-200">
|
294 |
+
<div class="flex">
|
295 |
+
<i class="fas fa-info-circle text-yellow-500 mt-1 mr-2"></i>
|
296 |
+
<div>
|
297 |
+
<h4 class="font-medium text-yellow-800">Deployment Requirements</h4>
|
298 |
+
<p class="text-sm text-yellow-700 mt-1">Make sure you have Python 3.7+ installed. For GPU acceleration, ensure proper CUDA setup if using local deployment.</p>
|
299 |
+
</div>
|
300 |
+
</div>
|
301 |
+
</div>
|
302 |
+
</div>
|
303 |
+
|
304 |
+
<!-- Action Buttons -->
|
305 |
+
<div class="flex justify-end space-x-4 mt-6">
|
306 |
+
<button class="px-6 py-2 border border-gray-300 rounded-md font-medium text-gray-700 hover:bg-gray-50">
|
307 |
+
Save Draft
|
308 |
+
</button>
|
309 |
+
<button class="px-6 py-2 bg-purple-600 text-white rounded-md font-medium hover:bg-purple-700">
|
310 |
+
Export App <i class="fas fa-arrow-right ml-1"></i>
|
311 |
+
</button>
|
312 |
+
</div>
|
313 |
+
</div>
|
314 |
+
</div>
|
315 |
+
</div>
|
316 |
+
</section>
|
317 |
+
|
318 |
+
<!-- Features Section -->
|
319 |
+
<section class="py-16 bg-gray-100">
|
320 |
+
<div class="container mx-auto px-6">
|
321 |
+
<h2 class="text-3xl font-bold text-center mb-12 text-gray-800">Powerful Features</h2>
|
322 |
+
<div class="grid md:grid-cols-3 gap-8">
|
323 |
+
<div class="bg-white p-8 rounded-xl shadow-sm hover:shadow-md transition">
|
324 |
+
<div class="w-12 h-12 bg-purple-100 rounded-full flex items-center justify-center mb-4">
|
325 |
+
<i class="fas fa-bolt text-purple-600 text-xl"></i>
|
326 |
+
</div>
|
327 |
+
<h3 class="text-xl font-semibold mb-3 text-gray-800">Multi-Model Integration</h3>
|
328 |
+
<p class="text-gray-600">Seamlessly switch between different AI models including OpenAI, Anthropic, and open-source alternatives.</p>
|
329 |
+
</div>
|
330 |
+
<div class="bg-white p-8 rounded-xl shadow-sm hover:shadow-md transition">
|
331 |
+
<div class="w-12 h-12 bg-blue-100 rounded-full flex items-center justify-center mb-4">
|
332 |
+
<i class="fas fa-code text-blue-600 text-xl"></i>
|
333 |
+
</div>
|
334 |
+
<h3 class="text-xl font-semibold mb-3 text-gray-800">Real-Time Code Generation</h3>
|
335 |
+
<p class="text-gray-600">Get clean, production-ready Python code for both Streamlit and Gradio frameworks.</p>
|
336 |
+
</div>
|
337 |
+
<div class="bg-white p-8 rounded-xl shadow-sm hover:shadow-md transition">
|
338 |
+
<div class="w-12 h-12 bg-green-100 rounded-full flex items-center justify-center mb-4">
|
339 |
+
<i class="fas fa-share-alt text-green-600 text-xl"></i>
|
340 |
+
</div>
|
341 |
+
<h3 class="text-xl font-semibold mb-3 text-gray-800">One-Click Deployment</h3>
|
342 |
+
<p class="text-gray-600">Deploy your apps directly to Streamlit Cloud, Hugging Face Spaces, or export to GitHub.</p>
|
343 |
+
</div>
|
344 |
+
</div>
|
345 |
+
</div>
|
346 |
+
</section>
|
347 |
+
|
348 |
+
<!-- Footer -->
|
349 |
+
<footer class="bg-gray-900 text-white py-12">
|
350 |
+
<div class="container mx-auto px-6">
|
351 |
+
<div class="grid md:grid-cols-4 gap-8">
|
352 |
+
<div>
|
353 |
+
<h3 class="text-lg font-semibold mb-4">AI App Builder</h3>
|
354 |
+
<p class="text-gray-400">Build, customize and deploy AI applications in minutes without writing code.</p>
|
355 |
+
</div>
|
356 |
+
<div>
|
357 |
+
<h3 class="text-lg font-semibold mb-4">Resources</h3>
|
358 |
+
<ul class="space-y-2">
|
359 |
+
<li><a href="#" class="text-gray-400 hover:text-white">Documentation</a></li>
|
360 |
+
<li><a href="#" class="text-gray-400 hover:text-white">Tutorials</a></li>
|
361 |
+
<li><a href="#" class="text-gray-400 hover:text-white">API Reference</a></li>
|
362 |
+
<li><a href="#" class="text-gray-400 hover:text-white">Community</a></li>
|
363 |
+
</ul>
|
364 |
+
</div>
|
365 |
+
<div>
|
366 |
+
<h3 class="text-lg font-semibold mb-4">Company</h3>
|
367 |
+
<ul class="space-y-2">
|
368 |
+
<li><a href="#" class="text-gray-400 hover:text-white">About</a></li>
|
369 |
+
<li><a href="#" class="text-gray-400 hover:text-white">Blog</a></li>
|
370 |
+
<li><a href="#" class="text-gray-400 hover:text-white">Careers</a></li>
|
371 |
+
<li><a href="#" class="text-gray-400 hover:text-white">Contact</a></li>
|
372 |
+
</ul>
|
373 |
+
</div>
|
374 |
+
<div>
|
375 |
+
<h3 class="text-lg font-semibold mb-4">Subscribe</h3>
|
376 |
+
<p class="text-gray-400 mb-4">Get the latest updates and news.</p>
|
377 |
+
<div class="flex">
|
378 |
+
<input type="email" placeholder="Your email" class="px-4 py-2 bg-gray-800 text-white rounded-l-md focus:outline-none w-full">
|
379 |
+
<button class="bg-purple-600 px-4 py-2 rounded-r-md hover:bg-purple-700">
|
380 |
+
<i class="fas fa-paper-plane"></i>
|
381 |
+
</button>
|
382 |
+
</div>
|
383 |
+
</div>
|
384 |
+
</div>
|
385 |
+
<div class="border-t border-gray-800 mt-8 pt-8 flex flex-col md:flex-row justify-between items-center">
|
386 |
+
<p class="text-gray-400">© 2023 AI App Builder. All rights reserved.</p>
|
387 |
+
<div class="flex space-x-6 mt-4 md:mt-0">
|
388 |
+
<a href="#" class="text-gray-400 hover:text-white"><i class="fab fa-twitter"></i></a>
|
389 |
+
<a href="#" class="text-gray-400 hover:text-white"><i class="fab fa-github"></i></a>
|
390 |
+
<a href="#" class="text-gray-400 hover:text-white"><i class="fab fa-linkedin"></i></a>
|
391 |
+
<a href="#" class="text-gray-400 hover:text-white"><i class="fab fa-discord"></i></a>
|
392 |
+
</div>
|
393 |
+
</div>
|
394 |
+
</div>
|
395 |
+
</footer>
|
396 |
+
|
397 |
+
<script>
|
398 |
+
// Tab switching functionality
|
399 |
+
const tabs = ['preview', 'code', 'deploy'];
|
400 |
+
|
401 |
+
tabs.forEach(tab => {
|
402 |
+
const btn = document.getElementById(`${tab}-tab`);
|
403 |
+
const content = document.getElementById(`${tab}-content`);
|
404 |
+
|
405 |
+
btn.addEventListener('click', () => {
|
406 |
+
// Hide all content and remove active class from all tabs
|
407 |
+
tabs.forEach(t => {
|
408 |
+
document.getElementById(`${t}-content`).classList.add('hidden');
|
409 |
+
document.getElementById(`${t}-tab`).classList.remove('tab-active');
|
410 |
+
});
|
411 |
+
|
412 |
+
// Show selected content and add active class to clicked tab
|
413 |
+
content.classList.remove('hidden');
|
414 |
+
btn.classList.add('tab-active');
|
415 |
+
});
|
416 |
+
});
|
417 |
+
|
418 |
+
// Framework selection
|
419 |
+
const frameworks = ['streamlit', 'gradio'];
|
420 |
+
|
421 |
+
frameworks.forEach(framework => {
|
422 |
+
const btn = document.getElementById(`${framework}-btn`);
|
423 |
+
|
424 |
+
btn.addEventListener('click', () => {
|
425 |
+
// Remove active class from all framework buttons
|
426 |
+
frameworks.forEach(f => {
|
427 |
+
document.getElementById(`${f}-btn`).classList.remove('bg-purple-100', 'text-purple-700');
|
428 |
+
document.getElementById(`${f}-btn`).classList.add('bg-gray-200', 'text-gray-700');
|
429 |
+
});
|
430 |
+
|
431 |
+
// Add active class to clicked framework
|
432 |
+
btn.classList.remove('bg-gray-200', 'text-gray-700');
|
433 |
+
btn.classList.add('bg-purple-100', 'text-purple-700');
|
434 |
+
|
435 |
+
// Update the generated code based on framework
|
436 |
+
updateGeneratedCode(framework);
|
437 |
+
});
|
438 |
+
});
|
439 |
+
|
440 |
+
// Model selection
|
441 |
+
document.querySelectorAll('.model-card').forEach(card => {
|
442 |
+
card.addEventListener('click', () => {
|
443 |
+
// Remove selection from all cards
|
444 |
+
document.querySelectorAll('.model-card').forEach(c => {
|
445 |
+
c.classList.remove('border-purple-300', 'bg-purple-50');
|
446 |
+
});
|
447 |
+
|
448 |
+
// Add selection to clicked card
|
449 |
+
card.classList.add('border-purple-300', 'bg-purple-50');
|
450 |
+
|
451 |
+
// Update preview and code based on selected model
|
452 |
+
updateModelSelection(card.querySelector('span').textContent);
|
453 |
+
});
|
454 |
+
});
|
455 |
+
|
456 |
+
// Component selection
|
457 |
+
document.querySelectorAll('.component-btn').forEach(btn => {
|
458 |
+
btn.addEventListener('click', () => {
|
459 |
+
// Add component to preview and update code
|
460 |
+
addComponent(btn.querySelector('span').textContent);
|
461 |
+
});
|
462 |
+
});
|
463 |
+
|
464 |
+
// Copy code button
|
465 |
+
document.querySelector('.copy-btn').addEventListener('click', () => {
|
466 |
+
const code = document.getElementById('generated-code').textContent;
|
467 |
+
navigator.clipboard.writeText(code);
|
468 |
+
|
469 |
+
// Show copied feedback
|
470 |
+
const btn = document.querySelector('.copy-btn');
|
471 |
+
const originalText = btn.innerHTML;
|
472 |
+
btn.innerHTML = '<i class="fas fa-check mr-1"></i> Copied!';
|
473 |
+
|
474 |
+
setTimeout(() => {
|
475 |
+
btn.innerHTML = originalText;
|
476 |
+
}, 2000);
|
477 |
+
});
|
478 |
+
|
479 |
+
// Helper functions
|
480 |
+
function updateGeneratedCode(framework) {
|
481 |
+
const codeElement = document.getElementById('generated-code');
|
482 |
+
if (framework === 'streamlit') {
|
483 |
+
codeElement.textContent = `import streamlit as st
|
484 |
+
from transformers import pipeline
|
485 |
+
|
486 |
+
# Set up the page
|
487 |
+
st.set_page_config(page_title="My AI App", layout="wide")
|
488 |
+
st.title("My AI App")
|
489 |
+
|
490 |
+
# Initialize the model
|
491 |
+
@st.cache_resource
|
492 |
+
def load_model():
|
493 |
+
return pipeline("text-generation", model="gpt2")
|
494 |
+
|
495 |
+
model = load_model()
|
496 |
+
|
497 |
+
# User input
|
498 |
+
user_input = st.text_area("Enter your prompt", placeholder="Type something...")
|
499 |
+
|
500 |
+
# Generate response
|
501 |
+
if st.button("Submit"):
|
502 |
+
if user_input:
|
503 |
+
with st.spinner("Generating response..."):
|
504 |
+
response = model(user_input, max_length=100, num_return_sequences=1)
|
505 |
+
st.write(response[0]['generated_text'])
|
506 |
+
else:
|
507 |
+
st.warning("Please enter a prompt")`;
|
508 |
+
} else {
|
509 |
+
codeElement.textContent = `import gradio as gr
|
510 |
+
from transformers import pipeline
|
511 |
+
|
512 |
+
# Initialize the model
|
513 |
+
model = pipeline("text-generation", model="gpt2")
|
514 |
+
|
515 |
+
def generate_text(prompt):
|
516 |
+
if not prompt:
|
517 |
+
return "Please enter a prompt"
|
518 |
+
output = model(prompt, max_length=100, num_return_sequences=1)
|
519 |
+
return output[0]['generated_text']
|
520 |
+
|
521 |
+
# Create Gradio interface
|
522 |
+
demo = gr.Interface(
|
523 |
+
fn=generate_text,
|
524 |
+
inputs=gr.Textbox(placeholder="Type something...", label="Input"),
|
525 |
+
outputs=gr.Textbox(label="Generated Text"),
|
526 |
+
title="My AI App"
|
527 |
+
)
|
528 |
+
|
529 |
+
demo.launch()`;
|
530 |
+
}
|
531 |
+
}
|
532 |
+
|
533 |
+
function updateModelSelection(modelName) {
|
534 |
+
// In a real app, this would update the preview and code based on selected model
|
535 |
+
console.log(`Model changed to: ${modelName}`);
|
536 |
+
}
|
537 |
+
|
538 |
+
function addComponent(componentType) {
|
539 |
+
// In a real app, this would add the component to the preview and update code
|
540 |
+
console.log(`Adding component: ${componentType}`);
|
541 |
+
}
|
542 |
+
</script>
|
543 |
+
<p style="border-radius: 8px; text-align: center; font-size: 12px; color: #fff; margin-top: 16px;position: fixed; left: 8px; bottom: 8px; z-index: 10; background: rgba(0, 0, 0, 0.8); padding: 4px 8px;">Made with <img src="https://enzostvs-deepsite.hf.space/logo.svg" alt="DeepSite Logo" style="width: 16px; height: 16px; vertical-align: middle;display:inline-block;margin-right:3px;filter:brightness(0) invert(1);"><a href="https://enzostvs-deepsite.hf.space" style="color: #fff;text-decoration: underline;" target="_blank" >DeepSite</a> - 🧬 <a href="https://enzostvs-deepsite.hf.space?remix=S-Dreamer/ai-appbuilder" style="color: #fff;text-decoration: underline;" target="_blank" >Remix</a></p></body>
|
544 |
+
</html>
|