frimponge commited on
Commit
910c42f
·
verified ·
1 Parent(s): b598360

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -4
app.py CHANGED
@@ -98,15 +98,15 @@ class PoultryFarmBot:
98
 
99
  # Diagnose Disease Using Fecal Image
100
  def diagnose_disease(self, image):
101
- if image is not None and image.size > 0: # Ensure image is valid and has elements
102
  return self.predict(image)
103
- return "Please provide an image of poultry fecal matter for disease detection.", None, None, None
104
 
105
  # Initialize the bot instance
106
  bot = PoultryFarmBot()
107
 
108
- # Load Llama 2 model and tokenizer for text generation
109
- model_name = "meta-llama/Llama-2-7b-chat-hf"
110
  tokenizer = AutoTokenizer.from_pretrained(model_name)
111
  model = AutoModelForCausalLM.from_pretrained(model_name)
112
 
 
98
 
99
  # Diagnose Disease Using Fecal Image
100
  def diagnose_disease(self, image):
101
+ if image is not None and image.size > 0: # Ensure the image is valid and has elements
102
  return self.predict(image)
103
+ return "Please provide an image of poultry faecal matter for disease detection.", None, None, None
104
 
105
  # Initialize the bot instance
106
  bot = PoultryFarmBot()
107
 
108
+ # Load Llama 3.2 model and tokenizer for text generation
109
+ model_name = "meta-llama/Llama-3.2-1B"
110
  tokenizer = AutoTokenizer.from_pretrained(model_name)
111
  model = AutoModelForCausalLM.from_pretrained(model_name)
112