Spaces:
Sleeping
Sleeping
Update prompts.py
Browse files- prompts.py +1 -52
prompts.py
CHANGED
@@ -286,55 +286,4 @@ def generateFiles(
|
|
286 |
files.append(File(name="app.py", content=getStreamlitApp(app_type, app_name, app_description, app_features, app_dependencies, app_space, app_tutorial).code, language="python"))
|
287 |
elif app_type == AppType.REACT_APP:
|
288 |
files.append(File(name="App.js", content=getReactApp(app_type, app_name, app_description, app_features, app_dependencies, app_space, app_tutorial).code, language="javascript"))
|
289 |
-
return files
|
290 |
-
|
291 |
-
4. types.py
|
292 |
-
|
293 |
-
from enum import Enum
|
294 |
-
from typing import List, Dict, Optional
|
295 |
-
|
296 |
-
class Code:
|
297 |
-
def __init__(self, code: str, language: str):
|
298 |
-
self.code = code
|
299 |
-
self.language = language
|
300 |
-
|
301 |
-
class Prompt:
|
302 |
-
def __init__(self, prompt: str):
|
303 |
-
self.prompt = prompt
|
304 |
-
|
305 |
-
class AppType(Enum):
|
306 |
-
WEB_APP = "web app"
|
307 |
-
GRADIO_APP = "gradio app"
|
308 |
-
STREAMLIT_APP = "streamlit app"
|
309 |
-
REACT_APP = "react app"
|
310 |
-
|
311 |
-
class File:
|
312 |
-
def __init__(self, name: str, content: str, language: str):
|
313 |
-
self.name = name
|
314 |
-
self.content = content
|
315 |
-
self.language = language
|
316 |
-
|
317 |
-
class Space:
|
318 |
-
def __init__(self, space: str):
|
319 |
-
self.space = space
|
320 |
-
|
321 |
-
class Tutorial:
|
322 |
-
def __init__(self, tutorial: str):
|
323 |
-
self.tutorial = tutorial
|
324 |
-
|
325 |
-
class App:
|
326 |
-
def __init__(self, code: str, language: str):
|
327 |
-
self.code = code
|
328 |
-
self.language = language
|
329 |
-
|
330 |
-
class WebApp(App):
|
331 |
-
pass
|
332 |
-
|
333 |
-
class GradioApp(App):
|
334 |
-
pass
|
335 |
-
|
336 |
-
class StreamlitApp(App):
|
337 |
-
pass
|
338 |
-
|
339 |
-
class ReactApp(App):
|
340 |
-
pass
|
|
|
286 |
files.append(File(name="app.py", content=getStreamlitApp(app_type, app_name, app_description, app_features, app_dependencies, app_space, app_tutorial).code, language="python"))
|
287 |
elif app_type == AppType.REACT_APP:
|
288 |
files.append(File(name="App.js", content=getReactApp(app_type, app_name, app_description, app_features, app_dependencies, app_space, app_tutorial).code, language="javascript"))
|
289 |
+
return files
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|