Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -135,18 +135,15 @@ available_models = {
|
|
135 |
"Code Generation & Completion": {
|
136 |
"Salesforce CodeGen-350M (Mono)": pipeline("text-generation", model="Salesforce/codegen-350M-mono"),
|
137 |
"BigCode StarCoder": pipeline("text-generation", model="bigcode/starcoder"),
|
138 |
-
"Mixtral-8x7B-v0.1": pipeline("text-generation", model="mistralai/Mixtral-8x7B-v0.1"),
|
139 |
"CodeGPT-small-py": pipeline("text-generation", model="microsoft/CodeGPT-small-py"),
|
140 |
"PolyCoder-2.7B": pipeline("text-generation", model="NinedayWang/PolyCoder-2.7B"),
|
141 |
"InCoder-1B": pipeline("text-generation", model="facebook/incoder-1B"),
|
142 |
-
#... more code generation models
|
143 |
},
|
144 |
"Code Translation": {
|
145 |
-
"Python to JavaScript": (lambda code, pipe=pipeline("translation", model="transformersbook/codeparrot-translation-en-java"): execute_translation(code, "javascript", pipe), []),
|
146 |
-
"Python to C++": (lambda code, pipe=pipeline("text-generation", model="konodyuk/codeparrot-small-trans-py-cpp"): execute_translation(code, "cpp", pipe), []),
|
147 |
-
#... more language pairs
|
148 |
},
|
149 |
-
|
150 |
}
|
151 |
|
152 |
# Gradio interface with tabs
|
|
|
135 |
"Code Generation & Completion": {
|
136 |
"Salesforce CodeGen-350M (Mono)": pipeline("text-generation", model="Salesforce/codegen-350M-mono"),
|
137 |
"BigCode StarCoder": pipeline("text-generation", model="bigcode/starcoder"),
|
|
|
138 |
"CodeGPT-small-py": pipeline("text-generation", model="microsoft/CodeGPT-small-py"),
|
139 |
"PolyCoder-2.7B": pipeline("text-generation", model="NinedayWang/PolyCoder-2.7B"),
|
140 |
"InCoder-1B": pipeline("text-generation", model="facebook/incoder-1B"),
|
|
|
141 |
},
|
142 |
"Code Translation": {
|
143 |
+
"Python to JavaScript": (lambda code, pipe=pipeline("translation", model="transformersbook/codeparrot-translation-en-java"): execute_translation(code, "javascript", pipe), []),
|
144 |
+
"Python to C++": (lambda code, pipe=pipeline("text-generation", model="konodyuk/codeparrot-small-trans-py-cpp"): execute_translation(code, "cpp", pipe), []),
|
|
|
145 |
},
|
146 |
+
# ... other categories
|
147 |
}
|
148 |
|
149 |
# Gradio interface with tabs
|