Spaces:
Sleeping
Sleeping
DEBUG: pypdf -> pdfminer
Browse files
app.py
CHANGED
@@ -4,13 +4,16 @@ import tempfile
|
|
4 |
from functions import *
|
5 |
from langchain_community.document_loaders import PDFMinerLoader
|
6 |
import pandas as pd
|
7 |
-
from fastapi import FastAPI, File, UploadFile
|
8 |
from pydantic import BaseModel
|
9 |
from fastapi.middleware.cors import CORSMiddleware
|
10 |
-
from langchain_community.document_loaders import
|
11 |
from src.api.speech_api import speech_translator_router
|
12 |
from functions import client as supabase
|
13 |
from urllib.parse import urlparse
|
|
|
|
|
|
|
14 |
|
15 |
app = FastAPI(title="ConversAI", root_path="/api/v1")
|
16 |
|
@@ -130,8 +133,7 @@ async def sign_out(user_id):
|
|
130 |
|
131 |
@app.post("/oauth")
|
132 |
async def oauth(provider):
|
133 |
-
res = supabase.auth.sign_in_with_oauth(provider)
|
134 |
-
|
135 |
return res
|
136 |
|
137 |
|
|
|
4 |
from functions import *
|
5 |
from langchain_community.document_loaders import PDFMinerLoader
|
6 |
import pandas as pd
|
7 |
+
from fastapi import FastAPI, File, UploadFile, HTTPException
|
8 |
from pydantic import BaseModel
|
9 |
from fastapi.middleware.cors import CORSMiddleware
|
10 |
+
from langchain_community.document_loaders import UnstructuredURLLoader
|
11 |
from src.api.speech_api import speech_translator_router
|
12 |
from functions import client as supabase
|
13 |
from urllib.parse import urlparse
|
14 |
+
import nltk
|
15 |
+
|
16 |
+
nltk.download('punkt_tab')
|
17 |
|
18 |
app = FastAPI(title="ConversAI", root_path="/api/v1")
|
19 |
|
|
|
133 |
|
134 |
@app.post("/oauth")
|
135 |
async def oauth(provider):
|
136 |
+
res = supabase.auth.sign_in_with_oauth({"provider": provider})
|
|
|
137 |
return res
|
138 |
|
139 |
|