yuvaranianandhan24 commited on
Commit
83a2e00
1 Parent(s): 3e8c833

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -2
app.py CHANGED
@@ -5,6 +5,7 @@ from dotenv import load_dotenv
5
  from llama_index.embeddings.huggingface import HuggingFaceEmbedding
6
  from llama_index.core import Settings
7
  import os
 
8
  import base64
9
 
10
  # Load environment variables
@@ -12,8 +13,8 @@ load_dotenv()
12
 
13
  # Configure the Llama index settings
14
  Settings.llm = HuggingFaceInferenceAPI(
15
- model_name="google/gemma-1.1-7b-it",
16
- tokenizer_name="google/gemma-1.1-7b-it",
17
  context_window=3900,
18
  token=os.getenv("HF_TOKEN"),
19
  max_new_tokens=1000,
 
5
  from llama_index.embeddings.huggingface import HuggingFaceEmbedding
6
  from llama_index.core import Settings
7
  import os
8
+ from transformers import AutoTokenizer, AutoModelForCausalLM
9
  import base64
10
 
11
  # Load environment variables
 
13
 
14
  # Configure the Llama index settings
15
  Settings.llm = HuggingFaceInferenceAPI(
16
+ model_name= AutoModelForCausalLM.from_pretrained("meta-llama/Meta-Llama-3-8B-Instruct")
17
+ tokenizer_name = AutoTokenizer.from_pretrained("meta-llama/Meta-Llama-3-8B-Instruct")
18
  context_window=3900,
19
  token=os.getenv("HF_TOKEN"),
20
  max_new_tokens=1000,