Ved Gupta commited on
Commit
c936edb
·
1 Parent(s): f1cd69e
Files changed (3) hide show
  1. Dockerfile +6 -6
  2. README.md +9 -0
  3. app/core/models/User.py +2 -2
Dockerfile CHANGED
@@ -1,12 +1,12 @@
1
  FROM tiangolo/uvicorn-gunicorn-fastapi:python3.8
2
 
3
- COPY ./app /app/app
4
 
5
- COPY ./requirements.txt /app
6
- COPY .env /app
7
 
8
- RUN pip install --no-cache-dir -r /app/requirements.txt
9
 
10
- EXPOSE 80
11
 
12
- CMD ["uvicorn", "app.main:app", "--host", "0.0.0.0", "--port", "80"]
 
 
1
  FROM tiangolo/uvicorn-gunicorn-fastapi:python3.8
2
 
3
+ WORKDIR /code
4
 
5
+ COPY ./requirements.txt /code/requirements.txt
6
+ COPY .env /code
7
 
8
+ RUN pip install --no-cache-dir --upgrade -r /code/requirements.txt
9
 
 
10
 
11
+ CMD ["uvicorn", "app.main:app", "--host", "0.0.0.0", "--port", "7860"]
12
+
README.md CHANGED
@@ -1,3 +1,12 @@
 
 
 
 
 
 
 
 
 
1
  # whisper.api
2
 
3
  This project provides an API with user level access support to transcribe speech to text using a finetuned and processed Whisper ASR model.
 
1
+ ---
2
+ title: whisper.api
3
+ emoji: 🐳
4
+ colorFrom: purple
5
+ colorTo: gray
6
+ sdk: docker
7
+ app_port: 7860
8
+ ---
9
+
10
  # whisper.api
11
 
12
  This project provides an API with user level access support to transcribe speech to text using a finetuned and processed Whisper ASR model.
app/core/models/User.py CHANGED
@@ -59,10 +59,10 @@ class UserController:
59
  detail="Invalid Password",
60
  )
61
 
62
- isUserExists: Boolean = self.CheckUserIsExistsByEmailAndUsername(
63
  email, username
64
  )
65
- if isUserExists:
66
  raise HTTPException(
67
  status_code=status.HTTP_409_CONFLICT,
68
  detail="Email or Username Already Registered",
 
59
  detail="Invalid Password",
60
  )
61
 
62
+ is_user_exists: Boolean = self.CheckUserIsExistsByEmailAndUsername(
63
  email, username
64
  )
65
+ if is_user_exists:
66
  raise HTTPException(
67
  status_code=status.HTTP_409_CONFLICT,
68
  detail="Email or Username Already Registered",