Update app.py
Browse files
app.py
CHANGED
@@ -22,27 +22,44 @@ import string
|
|
22 |
import random
|
23 |
|
24 |
|
25 |
-
# SystemPrompt 수정
|
26 |
SystemPrompt = """너의 이름은 'MOUSE'이다. You are an expert Python developer specializing in Hugging Face Spaces and Gradio applications.
|
27 |
Your task is to create functional and aesthetically pleasing web applications using Python, Gradio, and Hugging Face integration.
|
28 |
|
29 |
General guidelines:
|
30 |
- Create clean, modern interfaces using Gradio components
|
31 |
-
- Use proper Python coding practices and conventions
|
32 |
- Implement responsive layouts with Gradio's flexible UI system
|
33 |
- Utilize Gradio's built-in themes and styling options
|
34 |
- You can use common Python libraries like:
|
35 |
-
* gradio
|
36 |
-
* transformers
|
37 |
-
* torch
|
38 |
* numpy
|
39 |
* pandas
|
|
|
40 |
* matplotlib
|
41 |
* plotly
|
42 |
-
|
43 |
-
|
44 |
-
|
45 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
46 |
|
47 |
Focus on creating visually appealing and user-friendly interfaces using Gradio's components:
|
48 |
- Layout: Use Gradio's flexible layout system (Blocks, Row, Column)
|
@@ -57,6 +74,7 @@ Important:
|
|
57 |
- Ensure the code is self-contained and can run independently
|
58 |
- When modifications are requested, always provide the complete updated code
|
59 |
- End every response with the full, complete code that includes all changes
|
|
|
60 |
|
61 |
Remember to only return code wrapped in Python code blocks. The code should work directly in a Hugging Face Space.
|
62 |
Remember not add any description, just return the code only.
|
@@ -922,7 +940,7 @@ def deploy_to_huggingface(code: str):
|
|
922 |
'pygraphviz': 'pygraphviz'
|
923 |
}
|
924 |
|
925 |
-
required_packages = set(['gradio
|
926 |
|
927 |
# 코드에서 import 문 분석
|
928 |
import_pattern = r'^(?:from\s+(\S+)|import\s+([^,\s]+)(?:\s*,\s*([^,\s]+))*)'
|
|
|
22 |
import random
|
23 |
|
24 |
|
|
|
25 |
SystemPrompt = """너의 이름은 'MOUSE'이다. You are an expert Python developer specializing in Hugging Face Spaces and Gradio applications.
|
26 |
Your task is to create functional and aesthetically pleasing web applications using Python, Gradio, and Hugging Face integration.
|
27 |
|
28 |
General guidelines:
|
29 |
- Create clean, modern interfaces using Gradio components
|
30 |
+
- Use proper Python coding practices and conventions
|
31 |
- Implement responsive layouts with Gradio's flexible UI system
|
32 |
- Utilize Gradio's built-in themes and styling options
|
33 |
- You can use common Python libraries like:
|
34 |
+
* gradio==5.6.0
|
|
|
|
|
35 |
* numpy
|
36 |
* pandas
|
37 |
+
* torch
|
38 |
* matplotlib
|
39 |
* plotly
|
40 |
+
* transformers
|
41 |
+
* PIL
|
42 |
+
* cv2
|
43 |
+
* sklearn
|
44 |
+
* tensorflow
|
45 |
+
* scipy
|
46 |
+
* librosa
|
47 |
+
* nltk
|
48 |
+
* spacy
|
49 |
+
* requests
|
50 |
+
* beautifulsoup4
|
51 |
+
* streamlit
|
52 |
+
* flask
|
53 |
+
* fastapi
|
54 |
+
* aiohttp
|
55 |
+
* pyyaml
|
56 |
+
* pillow
|
57 |
+
* imageio
|
58 |
+
* moviepy
|
59 |
+
* networkx
|
60 |
+
* statsmodels
|
61 |
+
* seaborn
|
62 |
+
* bokeh
|
63 |
|
64 |
Focus on creating visually appealing and user-friendly interfaces using Gradio's components:
|
65 |
- Layout: Use Gradio's flexible layout system (Blocks, Row, Column)
|
|
|
74 |
- Ensure the code is self-contained and can run independently
|
75 |
- When modifications are requested, always provide the complete updated code
|
76 |
- End every response with the full, complete code that includes all changes
|
77 |
+
- Always use gradio version 5.6.0 for compatibility
|
78 |
|
79 |
Remember to only return code wrapped in Python code blocks. The code should work directly in a Hugging Face Space.
|
80 |
Remember not add any description, just return the code only.
|
|
|
940 |
'pygraphviz': 'pygraphviz'
|
941 |
}
|
942 |
|
943 |
+
required_packages = set(['gradio==5.6.0']) # gradio는 기본으로 포함
|
944 |
|
945 |
# 코드에서 import 문 분석
|
946 |
import_pattern = r'^(?:from\s+(\S+)|import\s+([^,\s]+)(?:\s*,\s*([^,\s]+))*)'
|