Lui3ui3ui commited on
Commit
3a44df1
·
verified ·
1 Parent(s): 92644e3

Upload 2 files

Browse files
Files changed (2) hide show
  1. agents.py +3 -3
  2. requirements.txt +8 -9
agents.py CHANGED
@@ -13,7 +13,7 @@ from transformers import pipeline, AutoTokenizer, AutoModelForCausalLM
13
  # (this will download weights into the space cache)
14
  pipe = pipeline(
15
  "text-generation",
16
- model="mosaicml/mpt-7b-instruct",
17
  trust_remote_code=True, # only if the repo needs it
18
  device=-1 # use CPU; set device=0 if you have GPU
19
  )
@@ -106,7 +106,7 @@ async def extract_books_node(state):
106
  f"User input: {user_input}"
107
  )
108
  response = await chat(
109
- model="mosaicml/mpt-7b-instruct",
110
  messages=[{"role":"user","content": prompt}]
111
  )
112
  content = response["message"]["content"]
@@ -202,7 +202,7 @@ async def reasoning_node(state):
202
 
203
 
204
  response = await chat(
205
- model="mosaicml/mpt-7b-instruct",
206
  messages=[{"role":"user","content": prompt}]
207
  )
208
 
 
13
  # (this will download weights into the space cache)
14
  pipe = pipeline(
15
  "text-generation",
16
+ model="meta-llama/Llama-2-7B-chat",
17
  trust_remote_code=True, # only if the repo needs it
18
  device=-1 # use CPU; set device=0 if you have GPU
19
  )
 
106
  f"User input: {user_input}"
107
  )
108
  response = await chat(
109
+ model="meta-llama/Llama-2-7B-chat",
110
  messages=[{"role":"user","content": prompt}]
111
  )
112
  content = response["message"]["content"]
 
202
 
203
 
204
  response = await chat(
205
+ model="meta-llama/Llama-2-7B-chat",
206
  messages=[{"role":"user","content": prompt}]
207
  )
208
 
requirements.txt CHANGED
@@ -1,9 +1,8 @@
1
- langgraph
2
- ollama
3
- gradio
4
- httpx
5
- selectolax
6
- huggingface_hub
7
- transformers
8
- torch
9
- einops
 
1
+ langgraph
2
+ ollama
3
+ gradio
4
+ httpx
5
+ selectolax
6
+ huggingface_hub
7
+ transformers
8
+ torch