Frenchizer commited on
Commit
9541b76
·
verified ·
1 Parent(s): deb2d94

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -1
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.022):
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():