Skip to content

Commit

Permalink
Fixed uvicorn
Browse files Browse the repository at this point in the history
  • Loading branch information
rishit-singh committed Jan 21, 2024
1 parent 4ad810c commit 1b037f4
Showing 1 changed file with 15 additions and 4 deletions.
19 changes: 15 additions & 4 deletions backend/src/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,6 @@

from dotenv import load_dotenv
load_dotenv()
from ReplicateBot import ReplicateBot, Message
from ResumeBot import ResumeBot
from PDFExtractor import PDFExtractor

# from ReplicateBot import ReplicateBot, Message

Expand All @@ -30,4 +27,18 @@
# while (True):
# print(bot.States[-1].Result)

uvicorn.run("python.api:app", host="0.0.0.0", port=5000)


bot: ResumeBot = ResumeBot("mistralai/mixtral-8x7b-instruct-v0.1", os.environ["REPLICATE_API_TOKEN"])

# bot.Initialize(PDFExtractor.extract_text_from_pdf(open(sys.argv[1], 'rb').read())) # Initialize the llm with the resume


async def main():
config = uvicorn.Config("api:app", host="0.0.0.0", port=8000)
server = uvicorn.Server(config)
await server.serve()

if __name__ == "__main__":
asyncio.run(main())

0 comments on commit 1b037f4

Please sign in to comment.