inoculatemedia commited on
Commit
e3b939f
·
verified ·
1 Parent(s): 8901659

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -4
app.py CHANGED
@@ -15,14 +15,14 @@ subprocess.run(["playwright", "install"])
15
 
16
  # Load environment variables
17
  load_dotenv()
18
- HUGGINGFACEHUB_API_TOKEN = os.getenv('HUGGINGFACEHUB_API_TOKEN')
19
 
20
  # Initialize the model instances
21
  #repo_id = "mistralai/Mistral-7B-Instruct-v0.2"
22
  repo_id = "Qwen/Qwen2.5-72B-Instruct"
23
 
24
  llm_model_instance = HuggingFaceEndpoint(
25
- repo_id=repo_id, max_length=128, temperature=0.5, token=HUGGINGFACEHUB_API_TOKEN
26
  )
27
 
28
  embedder_model_instance = HuggingFaceInferenceAPIEmbeddings(
@@ -32,9 +32,8 @@ embedder_model_instance = HuggingFaceInferenceAPIEmbeddings(
32
  graph_config = {
33
  "llm": {
34
  "model_instance": llm_model_instance,
35
- "model_tokens": 10000,
36
  },
37
- "embeddings": {"model_instance": embedder_model_instance}
38
  }
39
  #######
40
  def clean_json_string(json_str):
 
15
 
16
  # Load environment variables
17
  load_dotenv()
18
+ HUGGINGFACEHUB_API_TOKEN = os.getenv('API_TOKEN')
19
 
20
  # Initialize the model instances
21
  #repo_id = "mistralai/Mistral-7B-Instruct-v0.2"
22
  repo_id = "Qwen/Qwen2.5-72B-Instruct"
23
 
24
  llm_model_instance = HuggingFaceEndpoint(
25
+ repo_id=repo_id, temperature=0.5, token=HUGGINGFACEHUB_API_TOKEN
26
  )
27
 
28
  embedder_model_instance = HuggingFaceInferenceAPIEmbeddings(
 
32
  graph_config = {
33
  "llm": {
34
  "model_instance": llm_model_instance,
 
35
  },
36
+ "embeddings": {"model_instance": embedder_model_instance}
37
  }
38
  #######
39
  def clean_json_string(json_str):