anithai commited on
Commit
9a47eac
·
verified ·
1 Parent(s): f0d61b0
Files changed (1) hide show
  1. app.py +4 -4
app.py CHANGED
@@ -1,11 +1,12 @@
1
  import gradio as gr
2
  import subprocess
3
- import shutil # For checking Java path
4
 
5
  def chatbot_interface(question):
6
- java_path = shutil.which("java") # Finds Java's path dynamically
 
7
  if not java_path:
8
- return "Error: Java is not installed or cannot be found."
9
 
10
  try:
11
  result = subprocess.run(
@@ -35,4 +36,3 @@ iface = gr.Interface(
35
  )
36
 
37
  iface.launch()
38
-
 
1
  import gradio as gr
2
  import subprocess
3
+ import shutil # For locating Java dynamically
4
 
5
  def chatbot_interface(question):
6
+ # Locate Java path dynamically
7
+ java_path = shutil.which("java")
8
  if not java_path:
9
+ return "Error: Java is still not installed or cannot be found."
10
 
11
  try:
12
  result = subprocess.run(
 
36
  )
37
 
38
  iface.launch()