medmac01 commited on
Commit
b9f8ea0
·
1 Parent(s): 9fc6d1f

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +7 -7
app.py CHANGED
@@ -35,14 +35,14 @@ def translate(text,source="English",target="Moroccan Arabic"):
35
  def generate_response(user_input):
36
 
37
  user_input_translated = str(translate(user_input, "Moroccan Arabic", "English"))
38
- name = 'Abbas'
39
  date = 'December'
40
- location = 'Benguerir, Morocco'
41
- soil_type = 'red soil'
42
  humidity = '40%'
43
- weather = 'Sunny'
44
- temp = '19C'
45
- agriculture = 'olives'
46
 
47
  # Add your chatbot logic here
48
  # For simplicity, the bot echoes the user's input in this example
@@ -55,7 +55,7 @@ land type: {soil_type}
55
  humidity: {humidity}
56
  weather: {weather}
57
  temperature: {temp}
58
- agriculture: {agriculture} Question: {user_input_translated}[/INST]</s>
59
  '''
60
  prompt = f'''
61
  You are an agriculture expert, Given the following informations, geographical coordinates (latitude and longitude), prevailing weather conditions, specific land type, chosen type of agriculture, and soil composition of a designated area, request the LLM to provide detailed insights and predictions on optimal agricultural practices, potential crop yields, and recommended soil management strategies, or answer the question below
 
35
  def generate_response(user_input):
36
 
37
  user_input_translated = str(translate(user_input, "Moroccan Arabic", "English"))
38
+ name = 'Mohammed'
39
  date = 'December'
40
+ location = 'Fes, Morocco'
41
+ soil_type = 'loam soil'
42
  humidity = '40%'
43
+ weather = 'Sunny/Haze'
44
+ temp = '10C'
45
+ # agriculture = 'olives'
46
 
47
  # Add your chatbot logic here
48
  # For simplicity, the bot echoes the user's input in this example
 
55
  humidity: {humidity}
56
  weather: {weather}
57
  temperature: {temp}
58
+ Question: {user_input_translated}[/INST]</s>
59
  '''
60
  prompt = f'''
61
  You are an agriculture expert, Given the following informations, geographical coordinates (latitude and longitude), prevailing weather conditions, specific land type, chosen type of agriculture, and soil composition of a designated area, request the LLM to provide detailed insights and predictions on optimal agricultural practices, potential crop yields, and recommended soil management strategies, or answer the question below