Spaces:
Runtime error
Runtime error
project-baize
commited on
Commit
•
95b9be1
1
Parent(s):
db8c43f
Update app.py
Browse files
app.py
CHANGED
@@ -47,6 +47,8 @@ def predict(text,
|
|
47 |
global total_count
|
48 |
total_count += 1
|
49 |
print(total_count)
|
|
|
|
|
50 |
with torch.no_grad():
|
51 |
for x in greedy_search(input_ids,model,tokenizer,stop_words=["[|Human|]", "[|AI|]"],max_length=max_length_tokens,temperature=temperature,top_p=top_p):
|
52 |
if is_stop_word_or_prefix(x,["[|Human|]", "[|AI|]"]) is False:
|
|
|
47 |
global total_count
|
48 |
total_count += 1
|
49 |
print(total_count)
|
50 |
+
if total_count % 50 == 0 :
|
51 |
+
os.system("nvidia-smi")
|
52 |
with torch.no_grad():
|
53 |
for x in greedy_search(input_ids,model,tokenizer,stop_words=["[|Human|]", "[|AI|]"],max_length=max_length_tokens,temperature=temperature,top_p=top_p):
|
54 |
if is_stop_word_or_prefix(x,["[|Human|]", "[|AI|]"]) is False:
|