Update app.py
Browse files
app.py
CHANGED
@@ -1,15 +1,3 @@
|
|
1 |
-
import subprocess
|
2 |
-
import sys
|
3 |
-
|
4 |
-
# Ensure dependencies are installed explicitly within the script
|
5 |
-
def install_dependencies():
|
6 |
-
try:
|
7 |
-
import transformers
|
8 |
-
except ImportError:
|
9 |
-
subprocess.check_call([sys.executable, "-m", "pip", "install", "transformers", "torch"])
|
10 |
-
|
11 |
-
install_dependencies() # Run the function to install dependencies
|
12 |
-
|
13 |
import streamlit as st
|
14 |
from transformers import pipeline
|
15 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
import streamlit as st
|
2 |
from transformers import pipeline
|
3 |
|