Spaces:
Build error
Build error
Commit
·
86769fb
1
Parent(s):
feb5ce7
add indexer
Browse files
app.py
CHANGED
|
@@ -2,6 +2,7 @@ from flask import Flask, jsonify, render_template, request, Response, abort
|
|
| 2 |
import os
|
| 3 |
import urllib.parse
|
| 4 |
from hf_scrapper import download_and_cache_file, get_system_proxies
|
|
|
|
| 5 |
from dotenv import load_dotenv
|
| 6 |
import json
|
| 7 |
|
|
@@ -15,6 +16,8 @@ CACHE_DIR = os.getenv("CACHE_DIR")
|
|
| 15 |
if not os.path.exists(CACHE_DIR):
|
| 16 |
os.makedirs(CACHE_DIR)
|
| 17 |
|
|
|
|
|
|
|
| 18 |
if not os.path.exists(INDEX_FILE):
|
| 19 |
raise FileNotFoundError(f"{INDEX_FILE} not found. Please make sure the file exists.")
|
| 20 |
|
|
|
|
| 2 |
import os
|
| 3 |
import urllib.parse
|
| 4 |
from hf_scrapper import download_and_cache_file, get_system_proxies
|
| 5 |
+
from indexer import indexer
|
| 6 |
from dotenv import load_dotenv
|
| 7 |
import json
|
| 8 |
|
|
|
|
| 16 |
if not os.path.exists(CACHE_DIR):
|
| 17 |
os.makedirs(CACHE_DIR)
|
| 18 |
|
| 19 |
+
indexer()
|
| 20 |
+
|
| 21 |
if not os.path.exists(INDEX_FILE):
|
| 22 |
raise FileNotFoundError(f"{INDEX_FILE} not found. Please make sure the file exists.")
|
| 23 |
|