Update app.py
Browse files
app.py
CHANGED
|
@@ -4,10 +4,10 @@ import Evaluate2
|
|
| 4 |
import re
|
| 5 |
|
| 6 |
def load_cpp_file(file):
|
| 7 |
-
text = file.name
|
| 8 |
-
if file is None:
|
| 9 |
-
return ""
|
| 10 |
try:
|
|
|
|
|
|
|
|
|
|
| 11 |
with open(text, 'r', encoding='utf-8') as f:
|
| 12 |
content = f.read()
|
| 13 |
return content
|
|
@@ -38,8 +38,8 @@ with gr.Blocks() as web:
|
|
| 38 |
cpp_file = gr.File(label="Upload C++ File (.cpp)", file_types=[".cpp"])
|
| 39 |
method_choice = gr.Radio(
|
| 40 |
choices=["No Format", "Format Code", "Combine"],
|
| 41 |
-
value=
|
| 42 |
-
label="
|
| 43 |
)
|
| 44 |
check_btn = gr.Button("Check")
|
| 45 |
|
|
|
|
| 4 |
import re
|
| 5 |
|
| 6 |
def load_cpp_file(file):
|
|
|
|
|
|
|
|
|
|
| 7 |
try:
|
| 8 |
+
text = file.name
|
| 9 |
+
if file is None:
|
| 10 |
+
return ""
|
| 11 |
with open(text, 'r', encoding='utf-8') as f:
|
| 12 |
content = f.read()
|
| 13 |
return content
|
|
|
|
| 38 |
cpp_file = gr.File(label="Upload C++ File (.cpp)", file_types=[".cpp"])
|
| 39 |
method_choice = gr.Radio(
|
| 40 |
choices=["No Format", "Format Code", "Combine"],
|
| 41 |
+
value="Combine",
|
| 42 |
+
label="Choose Model"
|
| 43 |
)
|
| 44 |
check_btn = gr.Button("Check")
|
| 45 |
|