sibthinon commited on
Commit
41cf03d
·
verified ·
1 Parent(s): 4df3547

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +5 -11
app.py CHANGED
@@ -16,16 +16,12 @@ import unicodedata
16
 
17
 
18
  qdrant_client = QdrantClient(
19
- #url=os.environ.get("Qdrant_url"),
20
- #api_key=os.environ.get("Qdrant_api"),
21
- url=userdata.get("Qdrant_url"),
22
- api_key=userdata.get("Qdrant_api"),
23
  )
24
 
25
- #AIRTABLE_API_KEY = os.environ.get("airtable_api")
26
- #BASE_ID = os.environ.get("airtable_baseid")
27
- AIRTABLE_API_KEY = "patwFFErs6fJ8fBhP.15dd01f7be728762fbbb03fdec6284ec01ee0ab84c0abd2ec17374cdaa63500e"
28
- BASE_ID = "app2OU6L8LK4JLV3M" # จาก URL ของคุณ
29
  TABLE_NAME = "Feedback_search" # หรือเปลี่ยนชื่อให้ชัดเช่น 'Feedback'
30
  api = Api(AIRTABLE_API_KEY)
31
  table = api.table(BASE_ID, TABLE_NAME)
@@ -56,10 +52,8 @@ model_config = {
56
  # Global memory to hold feedback state
57
  latest_query_result = {"query": "", "result": "", "model": "", "raw_query": "", "time": ""}
58
 
59
- with open("/content/drive/MyDrive/mypinmall/data/keyword_whitelist.pkl", "rb") as f:
60
  keyword_whitelist = pickle.load(f)
61
- #with open("keyword_whitelist.pkl", "rb") as f:
62
- # keyword_whitelist = pickle.load(f)
63
 
64
  def normalize(text: str) -> str:
65
  text = unicodedata.normalize("NFC", text)
 
16
 
17
 
18
  qdrant_client = QdrantClient(
19
+ url=os.environ.get("Qdrant_url"),
20
+ api_key=os.environ.get("Qdrant_api"),
 
 
21
  )
22
 
23
+ AIRTABLE_API_KEY = os.environ.get("airtable_api")
24
+ BASE_ID = os.environ.get("airtable_baseid")
 
 
25
  TABLE_NAME = "Feedback_search" # หรือเปลี่ยนชื่อให้ชัดเช่น 'Feedback'
26
  api = Api(AIRTABLE_API_KEY)
27
  table = api.table(BASE_ID, TABLE_NAME)
 
52
  # Global memory to hold feedback state
53
  latest_query_result = {"query": "", "result": "", "model": "", "raw_query": "", "time": ""}
54
 
55
+ with open("keyword_whitelist.pkl", "rb") as f:
56
  keyword_whitelist = pickle.load(f)
 
 
57
 
58
  def normalize(text: str) -> str:
59
  text = unicodedata.normalize("NFC", text)