sanjeevbora commited on
Commit
2426d62
·
verified ·
1 Parent(s): c7f2382
Files changed (1) hide show
  1. app.py +7 -3
app.py CHANGED
@@ -1,10 +1,14 @@
1
- import os
2
 
3
  script_path = './setup.sh' # Adjust the path if needed
4
 
5
- # Replace the current process with the shell script
6
- os.execvp('bash', ['bash', script_path])
7
 
 
 
 
 
8
 
9
  import gradio as gr
10
  from langchain.embeddings import HuggingFaceEmbeddings
 
1
+ import subprocess
2
 
3
  script_path = './setup.sh' # Adjust the path if needed
4
 
5
+ # Run the script
6
+ exit_code = subprocess.call(['bash', script_path])
7
 
8
+ if exit_code == 0:
9
+ print("Script executed successfully.")
10
+ else:
11
+ print(f"Script failed with exit code {exit_code}.")
12
 
13
  import gradio as gr
14
  from langchain.embeddings import HuggingFaceEmbeddings