anithai commited on
Commit
14f5355
·
verified ·
1 Parent(s): 1867378
Files changed (1) hide show
  1. app.py +5 -2
app.py CHANGED
@@ -3,8 +3,10 @@ import subprocess
3
 
4
  def chatbot_interface(question):
5
  try:
 
 
6
  result = subprocess.run(
7
- ['java', '-cp', '.:/content/json-20210307.jar', 'Main', question],
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(share=True)
 
 
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
+