Spaces:
Sleeping
Sleeping
RandomNameAnd6
commited on
Commit
•
6b1c78b
1
Parent(s):
d9126a3
Update app.py
Browse files
app.py
CHANGED
@@ -23,7 +23,7 @@ with open('dhar_mann_titles.txt', 'r') as file:
|
|
23 |
def generate_ai_title():
|
24 |
inputs = tokenizer(["<|startoftext|>"]*1, return_tensors = "pt")
|
25 |
outputs = model.generate(**inputs, max_new_tokens=50, use_cache=True, temperature=0.85, do_sample=True)
|
26 |
-
return (tokenizer.batch_decode(outputs)[0])[15
|
27 |
|
28 |
# Function to check user's answer and update score
|
29 |
def check_answer(user_choice, real_index, option1, option2, score):
|
|
|
23 |
def generate_ai_title():
|
24 |
inputs = tokenizer(["<|startoftext|>"]*1, return_tensors = "pt")
|
25 |
outputs = model.generate(**inputs, max_new_tokens=50, use_cache=True, temperature=0.85, do_sample=True)
|
26 |
+
return (tokenizer.batch_decode(outputs)[0])[15:-13]
|
27 |
|
28 |
# Function to check user's answer and update score
|
29 |
def check_answer(user_choice, real_index, option1, option2, score):
|