This commit is contained in:
Adil Hafeez 2024-11-26 11:01:16 -08:00
parent b1d150123e
commit ba74f6e313
4 changed files with 47 additions and 25 deletions

View file

@ -3,7 +3,6 @@ import yaml
import torch
import string
import logging
import pkg_resources
from openai import OpenAI
@ -11,13 +10,6 @@ from openai import OpenAI
logger_instance = None
def load_yaml_config(file_name):
# Load the YAML file from the package
yaml_path = pkg_resources.resource_filename("app", file_name)
with open(yaml_path, "r") as yaml_file:
return yaml.safe_load(yaml_file)
def get_device():
available_device = {
"cpu": True,