Update app.py
Browse files
app.py
CHANGED
|
@@ -1,15 +1,6 @@
|
|
| 1 |
import streamlit as st
|
| 2 |
from transformers import pipeline
|
| 3 |
|
| 4 |
-
# Install sentencepiece
|
| 5 |
-
import subprocess
|
| 6 |
-
import sys
|
| 7 |
-
|
| 8 |
-
def install(package):
|
| 9 |
-
subprocess.check_call([sys.executable, "-m", "pip", "install", package])
|
| 10 |
-
|
| 11 |
-
install("sentencepiece")
|
| 12 |
-
|
| 13 |
# Function to initialize pipelines with caching
|
| 14 |
@st.cache_resource
|
| 15 |
def load_summarizer():
|
|
@@ -59,3 +50,4 @@ def main():
|
|
| 59 |
if __name__ == "__main__":
|
| 60 |
main()
|
| 61 |
|
|
|
|
|
|
| 1 |
import streamlit as st
|
| 2 |
from transformers import pipeline
|
| 3 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 4 |
# Function to initialize pipelines with caching
|
| 5 |
@st.cache_resource
|
| 6 |
def load_summarizer():
|
|
|
|
| 50 |
if __name__ == "__main__":
|
| 51 |
main()
|
| 52 |
|
| 53 |
+
|