bharatcoder commited on
Commit
64dfb4b
·
verified ·
1 Parent(s): 9928bbd

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +5 -3
app.py CHANGED
@@ -1,6 +1,7 @@
1
 
2
  try:
3
  import os
 
4
  import gradio as gr
5
  import torch
6
  from sentence_transformers import SentenceTransformer
@@ -20,10 +21,11 @@ collection = None
20
  print(f"🔄 Connecting to ChromaDB from cloud...")
21
  database = os.environ.get("chromadb_db")
22
  api_key = os.environ.get("chromadb_api_key")
 
23
  client = chromadb.CloudClient(
24
- api_key=os.environ.get("chromadb_api_key"),
25
- tenant=os.environ.get("chromadb_tenant"),
26
- database=os.environ.get("chromadb_db")
27
  )
28
  print(f"Connection to chromabd successful {database} {api_key}")
29
 
 
1
 
2
  try:
3
  import os
4
+ from typing import Any, Dict, List, Optional
5
  import gradio as gr
6
  import torch
7
  from sentence_transformers import SentenceTransformer
 
21
  print(f"🔄 Connecting to ChromaDB from cloud...")
22
  database = os.environ.get("chromadb_db")
23
  api_key = os.environ.get("chromadb_api_key")
24
+ tenant=os.environ.get("chromadb_tenant")
25
  client = chromadb.CloudClient(
26
+ api_key=api_key,
27
+ tenant=tenant,
28
+ database=database
29
  )
30
  print(f"Connection to chromabd successful {database} {api_key}")
31