Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -37,7 +37,7 @@ for file_name in os.listdir('.'):
|
|
| 37 |
except Exception as e:
|
| 38 |
return f"Error: Failed to configure the Gemini API. Details: {e}"
|
| 39 |
|
| 40 |
-
# Function to embed text using the Google Generative AI
|
| 41 |
def embed_text(text):
|
| 42 |
return genai.embed_content(model='models/embedding-001', content=text, task_type='retrieval_document')['embedding']
|
| 43 |
|
|
|
|
| 37 |
except Exception as e:
|
| 38 |
return f"Error: Failed to configure the Gemini API. Details: {e}"
|
| 39 |
|
| 40 |
+
# Function to embed text using the Google Generative AI AP
|
| 41 |
def embed_text(text):
|
| 42 |
return genai.embed_content(model='models/embedding-001', content=text, task_type='retrieval_document')['embedding']
|
| 43 |
|