mswhite commited on
Commit
393499d
1 Parent(s): b8da5ad

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -6
app.py CHANGED
@@ -19,7 +19,7 @@ from transformers import AutoTokenizer, AutoModelForCausalLM
19
  # Constants / Globals
20
  # ==========================
21
 
22
- #NVIDIA_API_KEY = os.environ["API_KEY"] # API Key for the LLM - Using NVIDIA's NIM to access an 8 Billion parameter Llama3 model
23
 
24
  CHATBOT_HEIGHT = 500 # Height of Gradio Chatbot
25
  IMAGE_HEIGHT = 500
@@ -36,12 +36,10 @@ game = cMystery() # New myst
36
  # Using NVIDIA's NIM (NVIDIA Inference Microservices) to access an 8 Billion parameter Llama3 model
37
 
38
  #llm = ChatOpenAI(model = "meta/llama3-8b-instruct",temperature=0.5,max_tokens=1024,timeout=None,max_retries=2,
39
- # base_url = "https://integrate.api.nvidia.com/v1",
40
- # api_key = NVIDIA_API_KEY)
41
 
42
- tokenizer = AutoTokenizer.from_pretrained("meta-llama/Meta-Llama-3.1-8B-Instruct")
43
- model = AutoModelForCausalLM.from_pretrained("meta-llama/Meta-Llama-3.1-8B-Instruct")
44
- llm = ChatOpenAI(model= model)
45
 
46
  # ================================
47
  # Custom LangChain Tools and Pipes
 
19
  # Constants / Globals
20
  # ==========================
21
 
22
+ API_KEY = os.environ["API_KEY"] # API Key for the LLM - Using NVIDIA's NIM to access an 8 Billion parameter Llama3 model
23
 
24
  CHATBOT_HEIGHT = 500 # Height of Gradio Chatbot
25
  IMAGE_HEIGHT = 500
 
36
  # Using NVIDIA's NIM (NVIDIA Inference Microservices) to access an 8 Billion parameter Llama3 model
37
 
38
  #llm = ChatOpenAI(model = "meta/llama3-8b-instruct",temperature=0.5,max_tokens=1024,timeout=None,max_retries=2,
39
+ #base_url = "https://integrate.api.nvidia.com/v1",
40
+ #api_key = NVIDIA_API_KEY)
41
 
42
+ llm = ChatOpenAI(model = "gpt-4o",temperature=1.0,max_tokens=1024,timeout=None,max_retries=2,api_key=API_KEY)
 
 
43
 
44
  # ================================
45
  # Custom LangChain Tools and Pipes