Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
|
@@ -3,8 +3,14 @@ from __future__ import annotations
|
|
| 3 |
|
| 4 |
import json
|
| 5 |
import os
|
|
|
|
|
|
|
| 6 |
from typing import Optional
|
| 7 |
|
|
|
|
|
|
|
|
|
|
|
|
|
| 8 |
import httpx
|
| 9 |
from dotenv import load_dotenv
|
| 10 |
from fastapi import FastAPI, HTTPException
|
|
|
|
| 3 |
|
| 4 |
import json
|
| 5 |
import os
|
| 6 |
+
import pathlib
|
| 7 |
+
import sys
|
| 8 |
from typing import Optional
|
| 9 |
|
| 10 |
+
CURRENT_DIR = pathlib.Path(__file__).resolve().parent
|
| 11 |
+
if str(CURRENT_DIR) not in sys.path:
|
| 12 |
+
sys.path.insert(0, str(CURRENT_DIR))
|
| 13 |
+
|
| 14 |
import httpx
|
| 15 |
from dotenv import load_dotenv
|
| 16 |
from fastapi import FastAPI, HTTPException
|