Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -19,8 +19,8 @@ embeddings = torch.tensor(df['embedding'].tolist(), device=device)
|
|
19 |
model = SentenceTransformer('all-MiniLM-L6-v2', device=device)
|
20 |
|
21 |
# Load the ai model for response generation
|
22 |
-
ai_tokenizer = AutoTokenizer.from_pretrained("openai-community/gpt2")
|
23 |
-
ai_model = AutoModelForCausalLM.from_pretrained("openai-community/gpt2").to(device)
|
24 |
|
25 |
# Define the function to find the most relevant document
|
26 |
@spaces.GPU(duration=120)
|
|
|
19 |
model = SentenceTransformer('all-MiniLM-L6-v2', device=device)
|
20 |
|
21 |
# Load the ai model for response generation
|
22 |
+
ai_tokenizer = AutoTokenizer.from_pretrained("openai-community/gpt2-large")
|
23 |
+
ai_model = AutoModelForCausalLM.from_pretrained("openai-community/gpt2-large").to(device)
|
24 |
|
25 |
# Define the function to find the most relevant document
|
26 |
@spaces.GPU(duration=120)
|