Spaces:
Sleeping
Sleeping
fixed spelling
Browse files- backend.py +2 -2
backend.py
CHANGED
@@ -40,7 +40,7 @@ model = AutoModelForCausalLM.from_pretrained(
|
|
40 |
model_id,
|
41 |
device_map="auto",
|
42 |
torch_dtype= torch.bfloat16 if torch.cuda.is_available() else torch.float32,
|
43 |
-
|
44 |
)
|
45 |
# what models will be used by LlamaIndex:
|
46 |
Settings.embed_model = InstructorEmbedding(model_name="hkunlp/instructor-base")
|
@@ -54,7 +54,7 @@ Settings.llm = GemmaLLMInterface(model=model, tokenizer=tokenizer)
|
|
54 |
nodes = None
|
55 |
index = None
|
56 |
|
57 |
-
@spaces.
|
58 |
def initialize_index():
|
59 |
global nodes, index
|
60 |
# Reading documents from disk
|
|
|
40 |
model_id,
|
41 |
device_map="auto",
|
42 |
torch_dtype= torch.bfloat16 if torch.cuda.is_available() else torch.float32,
|
43 |
+
token=True
|
44 |
)
|
45 |
# what models will be used by LlamaIndex:
|
46 |
Settings.embed_model = InstructorEmbedding(model_name="hkunlp/instructor-base")
|
|
|
54 |
nodes = None
|
55 |
index = None
|
56 |
|
57 |
+
@spaces.GPU(duration=90)
|
58 |
def initialize_index():
|
59 |
global nodes, index
|
60 |
# Reading documents from disk
|