ALVHB95 commited on
Commit
8963677
·
1 Parent(s): 104b93d
Files changed (1) hide show
  1. app.py +3 -3
app.py CHANGED
@@ -31,7 +31,7 @@ from pydantic import BaseModel
31
  import shutil
32
 
33
  # Cell 1: Image Classification Model
34
- image_pipeline = pipeline(task="image-classification", model="microsoft/resnet-50")
35
 
36
  def predict_image(input_img):
37
  predictions = image_pipeline(input_img)
@@ -69,7 +69,7 @@ vectordb = Chroma.from_documents(
69
  )
70
  # define retriever
71
  retriever = vectordb.as_retriever(search_type="mmr")
72
- template = """
73
  Your name is AngryGreta and you are a recycling chatbot with the objective to anwer questions from user in English or Spanish /
74
  Use the following pieces of context to answer the question if the question is related with recycling /
75
  No more than two chunks of context /
@@ -83,7 +83,7 @@ question: {question}
83
  """
84
 
85
  # Create the chat prompt templates
86
- system_prompt = SystemMessagePromptTemplate.from_template(template)
87
  qa_prompt = ChatPromptTemplate(
88
  messages=[
89
  system_prompt,
 
31
  import shutil
32
 
33
  # Cell 1: Image Classification Model
34
+ image_pipeline = pipeline(task="image-classification", model="rocioadlc/TrashNet_ResNet152V2")
35
 
36
  def predict_image(input_img):
37
  predictions = image_pipeline(input_img)
 
69
  )
70
  # define retriever
71
  retriever = vectordb.as_retriever(search_type="mmr")
72
+ prompt_template = """
73
  Your name is AngryGreta and you are a recycling chatbot with the objective to anwer questions from user in English or Spanish /
74
  Use the following pieces of context to answer the question if the question is related with recycling /
75
  No more than two chunks of context /
 
83
  """
84
 
85
  # Create the chat prompt templates
86
+ system_prompt = SystemMessagePromptTemplate.from_template(prompt_template)
87
  qa_prompt = ChatPromptTemplate(
88
  messages=[
89
  system_prompt,