Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -170,7 +170,7 @@ title = "Rename a variable in a Java class"
|
|
170 |
description = """This model is a fine-tuned GraphCodeBERT model fin-tuned to output higher-quality variable names for Java classes. Long classes are handled by the
|
171 |
model. Replace any variable name with a "[MASK]" to get an identifier renaming.
|
172 |
"""
|
173 |
-
ex = ["""import java.io.*;
|
174 |
public class x {
|
175 |
public static void main(String[] args) {
|
176 |
String f = "file.txt";
|
@@ -191,7 +191,7 @@ ex.printStackTrace();
|
|
191 |
}
|
192 |
}
|
193 |
}
|
194 |
-
}""", """import java.net.*;
|
195 |
import java.io.*;
|
196 |
|
197 |
public class s {
|
@@ -209,7 +209,7 @@ public class s {
|
|
209 |
if ([MASK] != null) [MASK].close();
|
210 |
}
|
211 |
}
|
212 |
-
}""", """import java.io.*;
|
213 |
import java.util.*;
|
214 |
|
215 |
public class y {
|
@@ -226,7 +226,7 @@ public class y {
|
|
226 |
e.printStackTrace();
|
227 |
}
|
228 |
}
|
229 |
-
}"""]
|
230 |
# We instantiate the Textbox class
|
231 |
textbox = gr.Textbox(label="Type Java code snippet:", placeholder="replace variable with [MASK]", lines=10)
|
232 |
|
|
|
170 |
description = """This model is a fine-tuned GraphCodeBERT model fin-tuned to output higher-quality variable names for Java classes. Long classes are handled by the
|
171 |
model. Replace any variable name with a "[MASK]" to get an identifier renaming.
|
172 |
"""
|
173 |
+
ex = [["""import java.io.*;
|
174 |
public class x {
|
175 |
public static void main(String[] args) {
|
176 |
String f = "file.txt";
|
|
|
191 |
}
|
192 |
}
|
193 |
}
|
194 |
+
}"""], ["""import java.net.*;
|
195 |
import java.io.*;
|
196 |
|
197 |
public class s {
|
|
|
209 |
if ([MASK] != null) [MASK].close();
|
210 |
}
|
211 |
}
|
212 |
+
}"""], ["""import java.io.*;
|
213 |
import java.util.*;
|
214 |
|
215 |
public class y {
|
|
|
226 |
e.printStackTrace();
|
227 |
}
|
228 |
}
|
229 |
+
}"""]]
|
230 |
# We instantiate the Textbox class
|
231 |
textbox = gr.Textbox(label="Type Java code snippet:", placeholder="replace variable with [MASK]", lines=10)
|
232 |
|