leadr64 commited on
Commit
b815515
·
1 Parent(s): 8033995
Files changed (2) hide show
  1. .env +2 -2
  2. app.py +3 -4
.env CHANGED
@@ -1,4 +1,4 @@
1
- QDRANT_URL=https://006817a4-0b45-4db8-a4e5-1f916808e19b.us-east4-0.gcp.cloud.qdrant.io:6333
2
- QDRANT_KEY=d9MUWQOMUA7JGBdpoFRtmou-h4Pf-e9uCrr0jMtUfAvvk4osqL_JtA
3
  AWS_ACCESS_KEY_ID=AKIAWOUASMWP5DM6RZG2
4
  AWS_SECRET_ACCESS_KEY=HfD73+MKijEgNlVRAkTEgRuNeivyFeYdrtLUqOmq
 
1
+ QDRANT_URL=https://ebe79742-e3ac-4d09-a2c6-63946024cc7a.us-east4-0.gcp.cloud.qdrant.io
2
+ QDRANT_KEY=_NnGLuSMH4Qwv-ancoFh88YvzuR7WbyidAorVOVQ_eMCbPhxTb2TSw
3
  AWS_ACCESS_KEY_ID=AKIAWOUASMWP5DM6RZG2
4
  AWS_SECRET_ACCESS_KEY=HfD73+MKijEgNlVRAkTEgRuNeivyFeYdrtLUqOmq
app.py CHANGED
@@ -13,8 +13,7 @@ QDRANT_URL = os.getenv('QDRANT_URL')
13
  QDRANT_KEY = os.getenv('QDRANT_KEY')
14
 
15
  # Vérifier les valeurs récupérées
16
- print(f"QDRANT_URL: {QDRANT_URL}")
17
- print(f"QDRANT_KEY: {QDRANT_KEY}")
18
 
19
  try:
20
  # Vérifier que les variables sont correctement récupérées
@@ -43,7 +42,7 @@ try:
43
  print(f"Text embed: {text_embed}")
44
 
45
  hits = client.search(
46
- collection_name="demo_spaces_db",
47
  query_vector=text_embed.tolist(),
48
  limit=max_results,
49
  )
@@ -54,7 +53,7 @@ try:
54
  for hit in hits])
55
  return [
56
  gr.Audio(
57
- hit.payload['audio_s3url'],
58
  label=f"style: {hit.payload['style']} -- score: {hit.score}")
59
  for hit in hits
60
  ]
 
13
  QDRANT_KEY = os.getenv('QDRANT_KEY')
14
 
15
  # Vérifier les valeurs récupérées
16
+
 
17
 
18
  try:
19
  # Vérifier que les variables sont correctement récupérées
 
42
  print(f"Text embed: {text_embed}")
43
 
44
  hits = client.search(
45
+ collection_name="music_db",
46
  query_vector=text_embed.tolist(),
47
  limit=max_results,
48
  )
 
53
  for hit in hits])
54
  return [
55
  gr.Audio(
56
+ hit.payload['url'],
57
  label=f"style: {hit.payload['style']} -- score: {hit.score}")
58
  for hit in hits
59
  ]