app.py
Browse files
app.py
CHANGED
|
@@ -3,8 +3,9 @@ import subprocess
|
|
| 3 |
|
| 4 |
def chatbot_interface(question):
|
| 5 |
try:
|
|
|
|
| 6 |
result = subprocess.run(
|
| 7 |
-
['java', '-cp', '/app:/app/lib/json-20210307.jar', 'Main', question],
|
| 8 |
capture_output=True,
|
| 9 |
text=True
|
| 10 |
)
|
|
@@ -30,4 +31,3 @@ iface = gr.Interface(
|
|
| 30 |
)
|
| 31 |
|
| 32 |
iface.launch(server_name="0.0.0.0", server_port=7860)
|
| 33 |
-
|
|
|
|
| 3 |
|
| 4 |
def chatbot_interface(question):
|
| 5 |
try:
|
| 6 |
+
# Use full path to Java if necessary
|
| 7 |
result = subprocess.run(
|
| 8 |
+
['/usr/bin/java', '-cp', '/app:/app/lib/json-20210307.jar', 'Main', question],
|
| 9 |
capture_output=True,
|
| 10 |
text=True
|
| 11 |
)
|
|
|
|
| 31 |
)
|
| 32 |
|
| 33 |
iface.launch(server_name="0.0.0.0", server_port=7860)
|
|
|