Update app.py
Browse files
app.py
CHANGED
|
@@ -17,7 +17,7 @@ def load_cpp_file(file):
|
|
| 17 |
def Evaluate_Code(code, method):
|
| 18 |
if len(code) >= 1500000:
|
| 19 |
return "Your code is too large", "-"
|
| 20 |
-
choices=["V.1.1 (No Format)", "V.1.2 (Format Code)", "
|
| 21 |
if method == choices[0]:
|
| 22 |
return Evaluate1.eval(code)
|
| 23 |
elif method == choices[1]:
|
|
@@ -36,11 +36,11 @@ def Evaluate_Code(code, method):
|
|
| 36 |
with gr.Blocks() as web:
|
| 37 |
with gr.Row():
|
| 38 |
with gr.Column(scale=1):
|
| 39 |
-
code_box = gr.Textbox(lines=20, label="**C++ Code")
|
| 40 |
with gr.Column(scale=1):
|
| 41 |
cpp_file = gr.File(label="Upload C++ File (.cpp)", file_types=[".cpp"])
|
| 42 |
method_choice = gr.Radio(
|
| 43 |
-
choices=["V.1.1 (No Format)", "V.1.2 (Format Code)", "
|
| 44 |
value="Combine",
|
| 45 |
label="Choose Model"
|
| 46 |
)
|
|
@@ -58,7 +58,8 @@ with gr.Blocks() as web:
|
|
| 58 |
|
| 59 |
gr.Markdown(
|
| 60 |
"<p style='font-size: 0.9em; color: gray;'>"
|
| 61 |
-
"<strong>
|
|
|
|
| 62 |
"</p>"
|
| 63 |
)
|
| 64 |
|
|
|
|
| 17 |
def Evaluate_Code(code, method):
|
| 18 |
if len(code) >= 1500000:
|
| 19 |
return "Your code is too large", "-"
|
| 20 |
+
choices=["V.1.1 (No Format)", "V.1.2 (Format Code)", "*Combined"]
|
| 21 |
if method == choices[0]:
|
| 22 |
return Evaluate1.eval(code)
|
| 23 |
elif method == choices[1]:
|
|
|
|
| 36 |
with gr.Blocks() as web:
|
| 37 |
with gr.Row():
|
| 38 |
with gr.Column(scale=1):
|
| 39 |
+
code_box = gr.Textbox(lines=20, label="** C++ Code")
|
| 40 |
with gr.Column(scale=1):
|
| 41 |
cpp_file = gr.File(label="Upload C++ File (.cpp)", file_types=[".cpp"])
|
| 42 |
method_choice = gr.Radio(
|
| 43 |
+
choices=["V.1.1 (No Format)", "V.1.2 (Format Code)", "*Combined"],
|
| 44 |
value="Combine",
|
| 45 |
label="Choose Model"
|
| 46 |
)
|
|
|
|
| 58 |
|
| 59 |
gr.Markdown(
|
| 60 |
"<p style='font-size: 0.9em; color: gray;'>"
|
| 61 |
+
"* <strong>Combined</strong> means we calculate the average result from two models and evaluate based on that.<br>"
|
| 62 |
+
"* You can submit any type of text, but we recommend submitting C++ code, as that is what our model was trained on."
|
| 63 |
"</p>"
|
| 64 |
)
|
| 65 |
|