Update main.py
Browse files
main.py
CHANGED
|
@@ -1,7 +1,7 @@
|
|
| 1 |
# api/main.py
|
| 2 |
from fastapi import FastAPI, HTTPException
|
| 3 |
import sentence_transformers
|
| 4 |
-
from huggingface_hub import hf_hub_download
|
| 5 |
import pandas as pd
|
| 6 |
|
| 7 |
from src.processor import send_to_dataset,search_and_retrieve,generate_tech
|
|
@@ -10,6 +10,10 @@ from pydantic import BaseModel
|
|
| 10 |
|
| 11 |
from datasets import load_dataset
|
| 12 |
|
|
|
|
|
|
|
|
|
|
|
|
|
| 13 |
# This is the main application object that Uvicorn will run
|
| 14 |
app = FastAPI(
|
| 15 |
title="My Standalone API",
|
|
|
|
| 1 |
# api/main.py
|
| 2 |
from fastapi import FastAPI, HTTPException
|
| 3 |
import sentence_transformers
|
| 4 |
+
from huggingface_hub import hf_hub_download, HfFolder
|
| 5 |
import pandas as pd
|
| 6 |
|
| 7 |
from src.processor import send_to_dataset,search_and_retrieve,generate_tech
|
|
|
|
| 10 |
|
| 11 |
from datasets import load_dataset
|
| 12 |
|
| 13 |
+
import os
|
| 14 |
+
|
| 15 |
+
login(token=os.getenv("HF_TOKEN"))
|
| 16 |
+
|
| 17 |
# This is the main application object that Uvicorn will run
|
| 18 |
app = FastAPI(
|
| 19 |
title="My Standalone API",
|