Spaces:
Running
Running
Ajout
Browse files
.env
CHANGED
@@ -1,4 +1,4 @@
|
|
1 |
-
QDRANT_URL=https://
|
2 |
-
QDRANT_KEY=
|
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 |
-
|
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="
|
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['
|
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 |
]
|