minor updates to fix directory
Browse files
app.py
CHANGED
@@ -9,6 +9,9 @@ PINECONE_API_KEY = os.getenv('PINECONE_API_KEY')
|
|
9 |
INDEX_NAME = os.getenv('INDEX_NAME')
|
10 |
NAMESPACE_NAME = os.getenv('NAMESPACE_NAME')
|
11 |
|
|
|
|
|
|
|
12 |
def category_radio(cat):
|
13 |
if cat == 'Computer Vision and Pattern Recognition':
|
14 |
return 'cs.CV'
|
@@ -57,7 +60,7 @@ with gr.Blocks() as demo:
|
|
57 |
@init_btn.click(inputs= [zotero_api_key, zotero_library_id, zotero_tag], outputs= [init_output])
|
58 |
def init(zotero_api_key, zotero_library_id, zotero_tag, hf_api_key = HF_API_KEY, pinecone_api_key = PINECONE_API_KEY, index_name = INDEX_NAME, namespace_name = NAMESPACE_NAME):
|
59 |
|
60 |
-
logging.basicConfig(filename= '
|
61 |
logging.info("Project Initialization Script Started (Serverless)")
|
62 |
|
63 |
ids = get_zotero_ids(zotero_api_key, zotero_library_id, zotero_tag)
|
|
|
9 |
INDEX_NAME = os.getenv('INDEX_NAME')
|
10 |
NAMESPACE_NAME = os.getenv('NAMESPACE_NAME')
|
11 |
|
12 |
+
script_dir = os.path.dirname(os.path.abspath(__file__))
|
13 |
+
os.chdir(script_dir)
|
14 |
+
|
15 |
def category_radio(cat):
|
16 |
if cat == 'Computer Vision and Pattern Recognition':
|
17 |
return 'cs.CV'
|
|
|
60 |
@init_btn.click(inputs= [zotero_api_key, zotero_library_id, zotero_tag], outputs= [init_output])
|
61 |
def init(zotero_api_key, zotero_library_id, zotero_tag, hf_api_key = HF_API_KEY, pinecone_api_key = PINECONE_API_KEY, index_name = INDEX_NAME, namespace_name = NAMESPACE_NAME):
|
62 |
|
63 |
+
logging.basicConfig(filename= 'logfile.log', level=logging.INFO, format='%(asctime)s - %(levelname)s - %(message)s')
|
64 |
logging.info("Project Initialization Script Started (Serverless)")
|
65 |
|
66 |
ids = get_zotero_ids(zotero_api_key, zotero_library_id, zotero_tag)
|