diff options
| -rw-r--r-- | API.py | 8 | 
1 files changed, 4 insertions, 4 deletions
| @@ -23,7 +23,7 @@ def index():  @app.get("/setu/{h_type}")  def get_setu(h_type: str):      if h_type == ModelName.alexnet: -        con = sqlite3.connect(Path('.') / 'ATRI' / 'sqlite' / 'setu' / 'normal.db') +        con = sqlite3.connect(Path('.') / 'ATRI' / 'data' / 'sqlite' / 'setu' / 'normal.db')          cur = con.cursor()          msg = cur.execute('SELECT * FROM normal ORDER BY RANDOM() limit 1;')          for i in msg: @@ -41,7 +41,7 @@ def get_setu(h_type: str):              return {"Pid": pid, 0:{"title": title,"tags": tags,"account": account, "name": name,"u_id": u_id, "user_link": user_link, "img": img}}      elif h_type == ModelName.resnet: -        con = sqlite3.connect(Path('.') / 'ATRI' / 'sqlite' / 'setu' / 'nearR18.db') +        con = sqlite3.connect(Path('.') / 'ATRI' / 'data' / 'sqlite' / 'setu' / 'nearR18.db')          cur = con.cursor()          msg = cur.execute('SELECT * FROM nearR18 ORDER BY RANDOM() limit 1;')          for i in msg: @@ -59,7 +59,7 @@ def get_setu(h_type: str):              return {"Pid": pid, 0:{"title": title,"tags": tags,"account": account, "name": name,"u_id": u_id, "user_link": user_link, "img": img}}      elif h_type == ModelName.lenet: -        con = sqlite3.connect(Path('.') / 'ATRI' / 'sqlite' / 'setu' / 'r18.db') +        con = sqlite3.connect(Path('.') / 'ATRI' / 'data' / 'sqlite' / 'setu' / 'r18.db')          cur = con.cursor()          msg = cur.execute('SELECT * FROM r18 ORDER BY RANDOM() limit 1;')          for i in msg: @@ -78,7 +78,7 @@ def get_setu(h_type: str):  @app.get("/cloudmusic")  async def Depression(): -    con = sqlite3.connect(Path('.') / 'ATRI' / 'sqlite' / 'cloudmusic' / 'cloudmusic.db') +    con = sqlite3.connect(Path('.') / 'ATRI' / 'data' / 'sqlite' / 'cloudmusic' / 'cloudmusic.db')      cur = con.cursor()      msg = cur.execute('SELECT * FROM cloudmusic ORDER BY RANDOM() limit 1;')      for i in msg: | 
