orionweller commited on
Commit
be785b0
1 Parent(s): 4ee7869

attempt to find java

Browse files
Files changed (1) hide show
  1. app.py +5 -0
app.py CHANGED
@@ -1,3 +1,8 @@
 
 
 
 
 
1
  import gradio as gr
2
  from pyserini.search.lucene import LuceneSearcher
3
  import os
 
1
+ import os
2
+ # set JAVA_HOME by finding it, e.g. JAVA_HOME=$(readlink -f /usr/bin/javac | sed "s:bin/javac::")
3
+ os.environ["JAVA_HOME"] = os.popen("readlink -f /usr/bin/javac | sed 's:bin/javac::'").read().strip()
4
+ print(os.environ["JAVA_HOME"])
5
+
6
  import gradio as gr
7
  from pyserini.search.lucene import LuceneSearcher
8
  import os