Spaces:
Sleeping
Sleeping
Hjgugugjhuhjggg
commited on
Update app.py
Browse files
app.py
CHANGED
@@ -92,6 +92,10 @@ class S3ModelLoader:
|
|
92 |
# Crear la instancia de FastAPI
|
93 |
app = FastAPI()
|
94 |
|
|
|
|
|
|
|
|
|
95 |
# Funci贸n de generaci贸n asincr贸nica
|
96 |
@app.post("/generate")
|
97 |
async def generate(body: GenerateRequest):
|
|
|
92 |
# Crear la instancia de FastAPI
|
93 |
app = FastAPI()
|
94 |
|
95 |
+
# Instanciar model_loader aqu铆
|
96 |
+
s3_client = boto3.client('s3', aws_access_key_id=AWS_ACCESS_KEY_ID, aws_secret_access_key=AWS_SECRET_ACCESS_KEY, region_name=AWS_REGION)
|
97 |
+
model_loader = S3ModelLoader(S3_BUCKET_NAME, s3_client)
|
98 |
+
|
99 |
# Funci贸n de generaci贸n asincr贸nica
|
100 |
@app.post("/generate")
|
101 |
async def generate(body: GenerateRequest):
|