Spaces:
Sleeping
Sleeping
add manual installation for transformers and huggingface_hub
Browse files
app.py
CHANGED
@@ -5,6 +5,16 @@ from huggingface_hub import login
|
|
5 |
import spaces
|
6 |
import gradio as gr
|
7 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
8 |
token = os.environ.get("HF_TOKEN_READ_LLAMA")
|
9 |
login(token)
|
10 |
|
|
|
5 |
import spaces
|
6 |
import gradio as gr
|
7 |
|
8 |
+
import subprocess
|
9 |
+
|
10 |
+
# Ensure the required libraries are installed
|
11 |
+
def install(package):
|
12 |
+
subprocess.check_call([os.sys.executable, "-m", "pip", "install", package])
|
13 |
+
|
14 |
+
# Install transformers, huggingface_hub
|
15 |
+
install("transformers")
|
16 |
+
install("huggingface_hub")
|
17 |
+
|
18 |
token = os.environ.get("HF_TOKEN_READ_LLAMA")
|
19 |
login(token)
|
20 |
|