Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -1,4 +1,3 @@
|
|
1 |
-
!pip install bitsandbytes accelerate
|
2 |
import os
|
3 |
from faiss import write_index
|
4 |
import gradio as gr
|
@@ -9,9 +8,17 @@ from torch.utils.data import DataLoader, Dataset
|
|
9 |
from datasets import load_dataset
|
10 |
import pandas as pd
|
11 |
import faiss
|
12 |
-
from transformers import
|
13 |
-
|
|
|
|
|
|
|
|
|
|
|
14 |
from threading import Thread
|
|
|
|
|
|
|
15 |
|
16 |
torch.set_num_threads(2)
|
17 |
HF_TOKEN = os.environ.get("SECRET_TOKEN")
|
|
|
|
|
1 |
import os
|
2 |
from faiss import write_index
|
3 |
import gradio as gr
|
|
|
8 |
from datasets import load_dataset
|
9 |
import pandas as pd
|
10 |
import faiss
|
11 |
+
from transformers import (
|
12 |
+
AutoTokenizer,
|
13 |
+
AutoModelForCausalLM,
|
14 |
+
BitsAndBytesConfig,
|
15 |
+
AutoModel,
|
16 |
+
TextIteratorStreamer
|
17 |
+
)
|
18 |
from threading import Thread
|
19 |
+
from transformers import TextIteratorStreamer
|
20 |
+
|
21 |
+
|
22 |
|
23 |
torch.set_num_threads(2)
|
24 |
HF_TOKEN = os.environ.get("SECRET_TOKEN")
|