Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
@@ -7,7 +7,6 @@ import time
|
|
7 |
import cv2
|
8 |
from PIL import Image
|
9 |
from deep_translator import GoogleTranslator
|
10 |
-
from transformers import AutoModelForMaskedLM
|
11 |
import json
|
12 |
from fastapi import FastAPI
|
13 |
|
@@ -46,8 +45,6 @@ theme = gr.themes.Soft(
|
|
46 |
button_cancel_background_fill_hover='*primary_400'
|
47 |
)
|
48 |
#----------End of theme----------
|
49 |
-
auth_token = os.environ.get("TOKEN_FROM_SECRET") or True
|
50 |
-
AutoModelForMaskedLM.from_pretrained("DigiP-AI/film-noir", use_auth_token=auth_token)
|
51 |
|
52 |
API_TOKEN = os.getenv("HF_READ_TOKEN")
|
53 |
headers = {"Authorization": f"Bearer {API_TOKEN}"}
|
|
|
7 |
import cv2
|
8 |
from PIL import Image
|
9 |
from deep_translator import GoogleTranslator
|
|
|
10 |
import json
|
11 |
from fastapi import FastAPI
|
12 |
|
|
|
45 |
button_cancel_background_fill_hover='*primary_400'
|
46 |
)
|
47 |
#----------End of theme----------
|
|
|
|
|
48 |
|
49 |
API_TOKEN = os.getenv("HF_READ_TOKEN")
|
50 |
headers = {"Authorization": f"Bearer {API_TOKEN}"}
|