Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -5,7 +5,7 @@ from fastapi.responses import FileResponse, JSONResponse, HTMLResponse
|
|
| 5 |
from fastapi.security import OAuth2PasswordBearer, OAuth2PasswordRequestForm
|
| 6 |
from fastapi.templating import Jinja2Templates
|
| 7 |
from pydantic import BaseModel, EmailStr, Field
|
| 8 |
-
from typing import List, Optional
|
| 9 |
import cv2
|
| 10 |
import numpy as np
|
| 11 |
import tensorflow as tf
|
|
@@ -93,7 +93,7 @@ class Token(BaseModel):
|
|
| 93 |
token_type: str
|
| 94 |
|
| 95 |
class TokenData(BaseModel):
|
| 96 |
-
username: str
|
| 97 |
|
| 98 |
class OCRResponse(BaseModel):
|
| 99 |
sakshi_output: str
|
|
|
|
| 5 |
from fastapi.security import OAuth2PasswordBearer, OAuth2PasswordRequestForm
|
| 6 |
from fastapi.templating import Jinja2Templates
|
| 7 |
from pydantic import BaseModel, EmailStr, Field
|
| 8 |
+
from typing import List, Optional # Import Optional from typing
|
| 9 |
import cv2
|
| 10 |
import numpy as np
|
| 11 |
import tensorflow as tf
|
|
|
|
| 93 |
token_type: str
|
| 94 |
|
| 95 |
class TokenData(BaseModel):
|
| 96 |
+
username: Optional[str] = None # Use Optional[str] instead of str | None
|
| 97 |
|
| 98 |
class OCRResponse(BaseModel):
|
| 99 |
sakshi_output: str
|