binary-husky
commited on
Commit
•
3f559ec
1
Parent(s):
c9abcef
Update functional_crazy.py
Browse files- functional_crazy.py +9 -13
functional_crazy.py
CHANGED
@@ -1,9 +1,7 @@
|
|
1 |
-
|
2 |
fast_debug = False
|
3 |
|
4 |
-
def
|
5 |
-
import time
|
6 |
-
from predict import predict_no_ui
|
7 |
for i in range(5):
|
8 |
i_say = f'我给出一个数字,你给出该数字的平方。我给出数字:{i}'
|
9 |
gpt_say = predict_no_ui(inputs=i_say, top_p=top_p, temperature=temperature)
|
@@ -15,7 +13,6 @@ def 自我程序解构简单案例(txt, top_p, temperature, chatbot, history, sy
|
|
15 |
|
16 |
def 解析项目本身(txt, top_p, temperature, chatbot, history, systemPromptTxt, WEB_PORT):
|
17 |
import time, glob, os
|
18 |
-
from predict import predict_no_ui
|
19 |
file_manifest = [f for f in glob.glob('*.py')]
|
20 |
|
21 |
for index, fp in enumerate(file_manifest):
|
@@ -59,7 +56,6 @@ def report_execption(chatbot, history, a, b):
|
|
59 |
|
60 |
def 解析源代码(file_manifest, project_folder, top_p, temperature, chatbot, history, systemPromptTxt):
|
61 |
import time, glob, os
|
62 |
-
from predict import predict_no_ui
|
63 |
print('begin analysis on:', file_manifest)
|
64 |
for index, fp in enumerate(file_manifest):
|
65 |
with open(fp, 'r', encoding='utf-8') as f:
|
@@ -154,22 +150,22 @@ def 解析一个C项目的头文件(txt, top_p, temperature, chatbot, history, s
|
|
154 |
|
155 |
def get_crazy_functionals():
|
156 |
return {
|
157 |
-
"
|
158 |
-
"Color": "stop", # 按钮颜色
|
159 |
-
"Function": 自我程序解构简单案例
|
160 |
-
},
|
161 |
-
"请解析并解构此项目本身": {
|
162 |
"Color": "stop", # 按钮颜色
|
163 |
"Function": 解析项目本身
|
164 |
},
|
165 |
-
"解析一整个Python项目(输入栏给定项目完整目录)": {
|
166 |
"Color": "stop", # 按钮颜色
|
167 |
"Function": 解析一个Python项目
|
168 |
},
|
169 |
-
"解析一整个C++项目的头文件(输入栏给定项目完整目录)": {
|
170 |
"Color": "stop", # 按钮颜色
|
171 |
"Function": 解析一个C项目的头文件
|
172 |
},
|
|
|
|
|
|
|
|
|
173 |
|
174 |
}
|
175 |
|
|
|
1 |
+
from predict import predict_no_ui
|
2 |
fast_debug = False
|
3 |
|
4 |
+
def 高阶功能模板函数(txt, top_p, temperature, chatbot, history, systemPromptTxt, WEB_PORT):
|
|
|
|
|
5 |
for i in range(5):
|
6 |
i_say = f'我给出一个数字,你给出该数字的平方。我给出数字:{i}'
|
7 |
gpt_say = predict_no_ui(inputs=i_say, top_p=top_p, temperature=temperature)
|
|
|
13 |
|
14 |
def 解析项目本身(txt, top_p, temperature, chatbot, history, systemPromptTxt, WEB_PORT):
|
15 |
import time, glob, os
|
|
|
16 |
file_manifest = [f for f in glob.glob('*.py')]
|
17 |
|
18 |
for index, fp in enumerate(file_manifest):
|
|
|
56 |
|
57 |
def 解析源代码(file_manifest, project_folder, top_p, temperature, chatbot, history, systemPromptTxt):
|
58 |
import time, glob, os
|
|
|
59 |
print('begin analysis on:', file_manifest)
|
60 |
for index, fp in enumerate(file_manifest):
|
61 |
with open(fp, 'r', encoding='utf-8') as f:
|
|
|
150 |
|
151 |
def get_crazy_functionals():
|
152 |
return {
|
153 |
+
"[实验功能] 请解析并解构此项目本身": {
|
|
|
|
|
|
|
|
|
154 |
"Color": "stop", # 按钮颜色
|
155 |
"Function": 解析项目本身
|
156 |
},
|
157 |
+
"[实验功能] 解析一整个Python项目(输入栏给定项目完整目录)": {
|
158 |
"Color": "stop", # 按钮颜色
|
159 |
"Function": 解析一个Python项目
|
160 |
},
|
161 |
+
"[实验功能] 解析一整个C++项目的头文件(输入栏给定项目完整目录)": {
|
162 |
"Color": "stop", # 按钮颜色
|
163 |
"Function": 解析一个C项目的头文件
|
164 |
},
|
165 |
+
"[实验功能] 高阶功能模板函数": {
|
166 |
+
"Color": "stop", # 按钮颜色
|
167 |
+
"Function": 高阶功能模板函数
|
168 |
+
},
|
169 |
|
170 |
}
|
171 |
|