Spaces:
Running
on
L4
Running
on
L4
Update app.py
Browse files
app.py
CHANGED
@@ -2,6 +2,7 @@
|
|
2 |
|
3 |
import gradio as gr
|
4 |
import os
|
|
|
5 |
|
6 |
import torch
|
7 |
import torch.nn.functional as F
|
@@ -105,6 +106,8 @@ DEFAULT_CONTENT = "LLMs steal our jobs."
|
|
105 |
|
106 |
# Function to make predictions
|
107 |
def predict(content, policy):
|
|
|
|
|
108 |
input_text = PROMPT.format(policy=policy, content=content)
|
109 |
input_ids = tokenizer.encode(input_text, return_tensors="pt").to(model.device)
|
110 |
|
|
|
2 |
|
3 |
import gradio as gr
|
4 |
import os
|
5 |
+
import time
|
6 |
|
7 |
import torch
|
8 |
import torch.nn.functional as F
|
|
|
106 |
|
107 |
# Function to make predictions
|
108 |
def predict(content, policy):
|
109 |
+
print(f"New request at {time.time()}")
|
110 |
+
|
111 |
input_text = PROMPT.format(policy=policy, content=content)
|
112 |
input_ids = tokenizer.encode(input_text, return_tensors="pt").to(model.device)
|
113 |
|