Spaces:
Runtime error
Runtime error
SivaResearch
commited on
Commit
•
baacd80
1
Parent(s):
2af286d
Update app.py
Browse files
app.py
CHANGED
@@ -13,10 +13,6 @@ model = AutoModelForCausalLM.from_pretrained("SivaResearch/tinyllama-Siv-v2")
|
|
13 |
device = torch.device('cuda' if torch.cuda.is_available() else 'cpu')
|
14 |
model = model.to(device)
|
15 |
|
16 |
-
|
17 |
-
|
18 |
-
|
19 |
-
|
20 |
# Defining a custom stopping criteria class for the model's text generation.
|
21 |
class StopOnTokens(StoppingCriteria):
|
22 |
def __call__(self, input_ids: torch.LongTensor, scores: torch.FloatTensor, **kwargs) -> bool:
|
|
|
13 |
device = torch.device('cuda' if torch.cuda.is_available() else 'cpu')
|
14 |
model = model.to(device)
|
15 |
|
|
|
|
|
|
|
|
|
16 |
# Defining a custom stopping criteria class for the model's text generation.
|
17 |
class StopOnTokens(StoppingCriteria):
|
18 |
def __call__(self, input_ids: torch.LongTensor, scores: torch.FloatTensor, **kwargs) -> bool:
|