Spaces:
Runtime error
Runtime error
AlexWortega
commited on
Commit
•
e3fae02
1
Parent(s):
9421b11
Update app.py
Browse files
app.py
CHANGED
@@ -11,7 +11,7 @@ def ans(question ):
|
|
11 |
print(f'Seed: {seed}')
|
12 |
torch.manual_seed(seed)
|
13 |
|
14 |
-
inp = tokenizer.encode(f'
|
15 |
print('question',question)
|
16 |
gen = model.generate(inp, do_sample=True, top_p=0.9, temperature=0.86, max_new_tokens=100, repetition_penalty=1.2) #, stop_token="<eos>")
|
17 |
|
|
|
11 |
print(f'Seed: {seed}')
|
12 |
torch.manual_seed(seed)
|
13 |
|
14 |
+
inp = tokenizer.encode(f'Вопрос: {question}\nОписание: {description}\nОтвет:',return_tensors="pt").to(device)
|
15 |
print('question',question)
|
16 |
gen = model.generate(inp, do_sample=True, top_p=0.9, temperature=0.86, max_new_tokens=100, repetition_penalty=1.2) #, stop_token="<eos>")
|
17 |
|