Spaces:
Sleeping
Sleeping
Commit
·
a573faa
1
Parent(s):
9543229
allow_flagging = False
Browse files- YourJavaProgram.class +0 -0
- app.py +4 -1
- output.txt +1 -0
YourJavaProgram.class
ADDED
Binary file (1.18 kB). View file
|
|
app.py
CHANGED
@@ -17,6 +17,8 @@ def java_program_runner(input_file):
|
|
17 |
input_value = file.read()
|
18 |
print(input_value)
|
19 |
run_java(input_value, output_file)
|
|
|
|
|
20 |
with open(output_file, "r") as file:
|
21 |
result = file.read()
|
22 |
print(result)
|
@@ -29,6 +31,7 @@ iface = gr.Interface(
|
|
29 |
title="Java Program Runner",
|
30 |
description="Runs a Java program and returns the result.",
|
31 |
theme="default",
|
|
|
32 |
)
|
33 |
|
34 |
-
iface.launch(server_name="0.0.0.0", server_port=
|
|
|
17 |
input_value = file.read()
|
18 |
print(input_value)
|
19 |
run_java(input_value, output_file)
|
20 |
+
# if output.txt is not created, create first
|
21 |
+
|
22 |
with open(output_file, "r") as file:
|
23 |
result = file.read()
|
24 |
print(result)
|
|
|
31 |
title="Java Program Runner",
|
32 |
description="Runs a Java program and returns the result.",
|
33 |
theme="default",
|
34 |
+
allow_flagging=False,
|
35 |
)
|
36 |
|
37 |
+
iface.launch(server_name="0.0.0.0", server_port=7861)
|
output.txt
ADDED
@@ -0,0 +1 @@
|
|
|
|
|
1 |
+
20
|