Skip to content

Commit

Permalink
structure
Browse files Browse the repository at this point in the history
  • Loading branch information
nlueem committed Aug 3, 2024
1 parent 4d254c8 commit 2caf535
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions app.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,13 +24,16 @@
app = FastAPI()

# Configure CORS
origins = ["*"]
ORIGINS = ["*"] #Cors-disabled
METHODS = ["POST"]
HEADERS = ["*"]

app.add_middleware(
CORSMiddleware,
allow_origins=origins,
allow_origins=ORIGINS,
allow_credentials=True,
allow_methods=["POST"],
allow_headers=["*"],
allow_methods=METHODS,
allow_headers=HEADERS,
)

# Detect host device for torch
Expand All @@ -49,6 +52,7 @@

# Create model pipeline
MODEL_ID = "meta-llama/Meta-Llama-3.1-8B-Instruct"

pipe = pipeline(
"text-generation",
model=MODEL_ID,
Expand Down

0 comments on commit 2caf535

Please sign in to comment.