Julien Matuszak commited on
Update app.py
Browse files
app.py
CHANGED
|
@@ -60,7 +60,7 @@ def softmax(x):
|
|
| 60 |
return exp_x / exp_x.sum()
|
| 61 |
|
| 62 |
# Function to detect context
|
| 63 |
-
def detect_context(input_text, threshold=0.
|
| 64 |
# Encode the input text
|
| 65 |
inputs = tokenizer([input_text], padding=True, truncation=True, return_tensors="pt")
|
| 66 |
with torch.no_grad():
|
|
|
|
| 60 |
return exp_x / exp_x.sum()
|
| 61 |
|
| 62 |
# Function to detect context
|
| 63 |
+
def detect_context(input_text, threshold=0.03):
|
| 64 |
# Encode the input text
|
| 65 |
inputs = tokenizer([input_text], padding=True, truncation=True, return_tensors="pt")
|
| 66 |
with torch.no_grad():
|