shoom013 commited on
Commit
7603764
1 Parent(s): 3d267e7

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +8 -0
app.py CHANGED
@@ -138,6 +138,14 @@ def rag(input_text, history, jezik, file):
138
  # metadatas=[{"state": "s0", "next": "s0", "used": False, "source": 'None', "page": -1, "lang": jezik } for i in range(len(documents)) ]
139
  # )
140
  ## else:
 
 
 
 
 
 
 
 
141
  o_jezik = "N/A"
142
  match jezik:
143
  case 'hrvatski':
 
138
  # metadatas=[{"state": "s0", "next": "s0", "used": False, "source": 'None', "page": -1, "lang": jezik } for i in range(len(documents)) ]
139
  # )
140
  ## else:
141
+ query_results = collection.query(
142
+ query_texts = [ input_text ],
143
+ n_results = max_results,
144
+ where = { "lang": jezik },
145
+ #where = { "$and": [ {"lang": jezik}, {"page": { "$nin": [ -1 ]}}]},
146
+ #where = { "$and": [ {"$and": [ { "$or": [ {"state": self.cs }, { "page": { "$nin": [ -1 ] } } ] } , { "used": False } ] } ,
147
+ # {"lang": jezik } ] },
148
+ )
149
  o_jezik = "N/A"
150
  match jezik:
151
  case 'hrvatski':