Skip to content

Commit

Permalink
Update server/main.py
Browse files Browse the repository at this point in the history
  • Loading branch information
sweep-ai[bot] authored Aug 7, 2023
1 parent 2dd7451 commit e7edc84
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions server/main.py
Original file line number Diff line number Diff line change
@@ -1,12 +1,20 @@
from fastapi import FastAPI
from transformers import logging
from dotenv import load_dotenv
from uvicorn import run
import os

from src.controllers.ForgeController import ForgeController

app = FastAPI()

logging.set_verbosity_error()

load_dotenv("../config/.env.local")

host = os.getenv("SERVER_HOST")
port = int(os.getenv("SERVER_PORT"))


@app.get("/")
def welcome():
Expand All @@ -22,3 +30,5 @@ def welcome():
forge_routes = ForgeController().get_router()

app.include_router(forge_routes)

run("main:app", host=host, port=port)

0 comments on commit e7edc84

Please sign in to comment.