初始化项目,由ModelHub XC社区提供模型
Model: GusPuffy/sentient-simulations-pydecompiler-3.7-6.7b-v0.9 Source: Original Platform
This commit is contained in:
17
util.py
Normal file
17
util.py
Normal file
@@ -0,0 +1,17 @@
|
||||
def create_prompt(bytecode: str):
|
||||
return (
|
||||
"\n\n".join(
|
||||
[
|
||||
"### Instruction:",
|
||||
"Using the provided Python 3.7 bytecode chunk, continue outputting the Python source code",
|
||||
"### Input:",
|
||||
bytecode,
|
||||
"### Response:",
|
||||
]
|
||||
)
|
||||
+ "\n\n"
|
||||
)
|
||||
|
||||
|
||||
def is_bytecode_empty(bytecode: str):
|
||||
return bytecode.strip() == "LOAD_CONST None\nRETURN_VALUE"
|
||||
Reference in New Issue
Block a user