Spaces:
Build error
Build error
app.py
Browse files
app.py
CHANGED
|
@@ -3,8 +3,10 @@ import subprocess
|
|
| 3 |
|
| 4 |
def chatbot_interface(question):
|
| 5 |
try:
|
|
|
|
|
|
|
| 6 |
result = subprocess.run(
|
| 7 |
-
[
|
| 8 |
capture_output=True,
|
| 9 |
text=True
|
| 10 |
)
|
|
@@ -29,4 +31,5 @@ iface = gr.Interface(
|
|
| 29 |
description="Ask syllabus-related questions and get accurate responses."
|
| 30 |
)
|
| 31 |
|
| 32 |
-
iface.launch(
|
|
|
|
|
|
| 3 |
|
| 4 |
def chatbot_interface(question):
|
| 5 |
try:
|
| 6 |
+
# Specify the full Java path for Hugging Face Spaces
|
| 7 |
+
java_path = "/usr/bin/java"
|
| 8 |
result = subprocess.run(
|
| 9 |
+
[java_path, '-cp', '.:/app/json-20210307.jar', 'Main', question],
|
| 10 |
capture_output=True,
|
| 11 |
text=True
|
| 12 |
)
|
|
|
|
| 31 |
description="Ask syllabus-related questions and get accurate responses."
|
| 32 |
)
|
| 33 |
|
| 34 |
+
iface.launch()
|
| 35 |
+
|