Spaces:
Sleeping
Sleeping
app.py
Browse files
app.py
CHANGED
@@ -1,4 +1,16 @@
|
|
1 |
import os
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2 |
from transformers import pipeline
|
3 |
# from langchain_huggingface import HuggingFaceEndpoint
|
4 |
import streamlit as st
|
|
|
1 |
import os
|
2 |
+
import subprocess
|
3 |
+
|
4 |
+
def install(package):
|
5 |
+
subprocess.check_call([os.sys.executable, "-m", "pip", "install", package])
|
6 |
+
|
7 |
+
# Install required packages
|
8 |
+
install("transformers==4.41.0")
|
9 |
+
install("langchain==0.0.175")
|
10 |
+
install("huggingface_hub==0.14.1")
|
11 |
+
install("streamlit==1.17.0")
|
12 |
+
|
13 |
+
|
14 |
from transformers import pipeline
|
15 |
# from langchain_huggingface import HuggingFaceEndpoint
|
16 |
import streamlit as st
|