pablorocg commited on
Commit
5c8f6f1
·
verified ·
1 Parent(s): 9c40e27

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +10 -3
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 AutoTokenizer, AutoModelForCausalLM, BitsAndBytesConfig, AutoModel
13
- from transformers import TextIteratorStreamer
 
 
 
 
 
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")