Spaces:
Runtime error
Runtime error
Update utils.py
Browse files
utils.py
CHANGED
|
@@ -9,6 +9,9 @@ def translate(input:str) -> str:
|
|
| 9 |
translated = GoogleTranslator(source='vi', target='en').translate(text=input)
|
| 10 |
return translated
|
| 11 |
def run_ag():
|
|
|
|
|
|
|
|
|
|
| 12 |
subprocess.run(["ag4masses/utils/run.sh"])
|
| 13 |
def read_solution():
|
| 14 |
with open('ag4mout/solution.out', 'r', encoding='utf-8') as f:
|
|
|
|
| 9 |
translated = GoogleTranslator(source='vi', target='en').translate(text=input)
|
| 10 |
return translated
|
| 11 |
def run_ag():
|
| 12 |
+
if os.path.exists('ag4mout'):
|
| 13 |
+
subprocess.run(["rm", "-rf", "ag4mout"])
|
| 14 |
+
subprocess.run(["mkdir", "ag4mout"])
|
| 15 |
subprocess.run(["ag4masses/utils/run.sh"])
|
| 16 |
def read_solution():
|
| 17 |
with open('ag4mout/solution.out', 'r', encoding='utf-8') as f:
|