Mbonea commited on
Commit
32a36b2
·
1 Parent(s): 1875ed6
App/Embedding/EmbeddingRoutes.py ADDED
@@ -0,0 +1,9 @@
 
 
 
 
 
 
 
 
 
 
1
+ from fastapi import APIRouter
2
+ from .Schemas import BaseRequest, GetTranscriptions
3
+ from App.Users.Model import User
4
+
5
+ embeddigs_router = APIRouter(tags=["embeddings"])
6
+
7
+ # create
8
+ # search
9
+ # update?
App/Embedding/Schemas.py ADDED
@@ -0,0 +1,14 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ from typing import Optional
2
+ from pydantic import BaseModel
3
+
4
+
5
+ class BaseRequest(BaseModel):
6
+ userId: int
7
+ taskId: str
8
+ fileName: str
9
+ youtubeLink: Optional[str]
10
+ telegramId: Optional[str]
11
+
12
+
13
+ class GetTranscriptions(BaseModel):
14
+ userId: int
App/Embedding/utils/Initialize.py ADDED
File without changes
App/app.py CHANGED
@@ -46,7 +46,7 @@ def authjwt_exception_handler(request: Request, exc: AuthJWTException):
46
  async def startup_event():
47
  await bot.start(bot_token="6183919505:AAEhHFt4mI18bQeAf2Lj7AePXFRPVLrOFM8")
48
  # await upload_bot.start()
49
- # await models.create_all()
50
 
51
  # await create_async_model(models)
52
  if not database.is_connected:
 
46
  async def startup_event():
47
  await bot.start(bot_token="6183919505:AAEhHFt4mI18bQeAf2Lj7AePXFRPVLrOFM8")
48
  # await upload_bot.start()
49
+ await models.create_all()
50
 
51
  # await create_async_model(models)
52
  if not database.is_connected:
App/modelInit.py CHANGED
@@ -10,7 +10,9 @@ import orm, asyncio
10
 
11
  # development
12
  # dbLink = "postgresql+asyncpg://postgres:[email protected]:5432/postgres"
13
- dbLink = "postgresql+asyncpg://postgres:[email protected]:5432/postgres"
 
 
14
  database = databases.Database(dbLink)
15
 
16
 
 
10
 
11
  # development
12
  # dbLink = "postgresql+asyncpg://postgres:[email protected]:5432/postgres"
13
+ # dbLink = "postgresql+asyncpg://postgres:[email protected]:5432/postgres"
14
+ dbLink = "mysql+aiomysql://i9xlhjk0gkor62rstpq3:pscale_pw_sIK2kegLrSMnWl3VtDuU8XTdYXxbu8jrnQoHVTnbpl3@aws.connect.psdb.cloud/transcription?ssl=true"
15
+
16
  database = databases.Database(dbLink)
17
 
18
 
requirements.txt CHANGED
@@ -29,4 +29,5 @@ python-multipart
29
  telethon
30
  fastapi-jwt-auth
31
  bcrypt
32
- asyncmy
 
 
29
  telethon
30
  fastapi-jwt-auth
31
  bcrypt
32
+ asyncmy
33
+ aiomysql