Update app.py
Browse files
app.py
CHANGED
@@ -30,7 +30,7 @@ def get_memory_usage():
|
|
30 |
process = psutil.Process()
|
31 |
memory_usage = process.memory_info().rss / 1024 / 1024 # メモリ使用量をMB単位で取得
|
32 |
return f"Memory Usage: {memory_usage:.2f} MB"
|
33 |
-
|
34 |
usag=get_memory_usage()
|
35 |
x_token = tokenizer("", prefix_text=input_text, return_tensors="pt")
|
36 |
input_ids = x_token.input_ids.to(device)
|
|
|
30 |
process = psutil.Process()
|
31 |
memory_usage = process.memory_info().rss / 1024 / 1024 # メモリ使用量をMB単位で取得
|
32 |
return f"Memory Usage: {memory_usage:.2f} MB"
|
33 |
+
def generate_text(input_text, num_repeats):
|
34 |
usag=get_memory_usage()
|
35 |
x_token = tokenizer("", prefix_text=input_text, return_tensors="pt")
|
36 |
input_ids = x_token.input_ids.to(device)
|