Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -62,13 +62,13 @@ AI71_API_KEY = "api71-api-20725a9d-46d6-4baf-9e26-abfca35ab242"
|
|
62 |
@app.route('/chat', methods=['POST'])
|
63 |
def chat():
|
64 |
message = request.json['message']
|
65 |
-
ai71 = AI71(AI71_API_KEY)
|
66 |
response = ""
|
67 |
if 'bug' in message:
|
68 |
return jsonify({'response': "To effectively manage tea mosquito bugs (TMB), a combination of strategies is recommended, including cultural practices, botanical insecticides, and, if necessary, chemical insecticides"})
|
69 |
else:
|
70 |
return jsonify({'response': "N-50,P-25,k-25"})
|
71 |
-
|
72 |
model="tiiuae/falcon-180b-chat",
|
73 |
messages=[
|
74 |
{"role": "system", "content": "You are a helpful assistant for a farming system.Guide the user properly to increase the yield."},
|
|
|
62 |
@app.route('/chat', methods=['POST'])
|
63 |
def chat():
|
64 |
message = request.json['message']
|
65 |
+
#ai71 = AI71(AI71_API_KEY)
|
66 |
response = ""
|
67 |
if 'bug' in message:
|
68 |
return jsonify({'response': "To effectively manage tea mosquito bugs (TMB), a combination of strategies is recommended, including cultural practices, botanical insecticides, and, if necessary, chemical insecticides"})
|
69 |
else:
|
70 |
return jsonify({'response': "N-50,P-25,k-25"})
|
71 |
+
'''for chunk in ai71.chat.completions.create(
|
72 |
model="tiiuae/falcon-180b-chat",
|
73 |
messages=[
|
74 |
{"role": "system", "content": "You are a helpful assistant for a farming system.Guide the user properly to increase the yield."},
|