Pclanglais commited on
Commit
6e2babb
1 Parent(s): 2bca27e

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -0
app.py CHANGED
@@ -39,6 +39,7 @@ system_prompt = "<|begin_of_text|><|start_header_id|>system<|end_header_id|>\n\n
39
 
40
  #Function to guess whether we use the RAG or not.
41
  def classification_chatrag(query):
 
42
  encoding = tokenizer(query, return_tensors="pt")
43
  encoding = {k: v.to(classifier_model.device) for k,v in encoding.items()}
44
 
@@ -55,6 +56,8 @@ def classification_chatrag(query):
55
  # Extract the float value from the tensor
56
  float_value = round(probs.item()*100)
57
 
 
 
58
  if float_value > 50:
59
  status = True
60
  print("We activate RAG")
 
39
 
40
  #Function to guess whether we use the RAG or not.
41
  def classification_chatrag(query):
42
+ print(query)
43
  encoding = tokenizer(query, return_tensors="pt")
44
  encoding = {k: v.to(classifier_model.device) for k,v in encoding.items()}
45
 
 
56
  # Extract the float value from the tensor
57
  float_value = round(probs.item()*100)
58
 
59
+ print(float_value)
60
+
61
  if float_value > 50:
62
  status = True
63
  print("We activate RAG")