Neurolingua commited on
Commit
0fca847
1 Parent(s): a4684f0

Update other_function.py

Browse files
Files changed (1) hide show
  1. other_function.py +5 -2
other_function.py CHANGED
@@ -82,7 +82,10 @@ def predict_disease(filepath):
82
  api_key="oF1aC4b1FBCDtK8CoKx7"
83
  )
84
  result = CLIENT.infer(filepath, model_id="plant-disease-detection-iefbi/1")
85
- return result['predicted_classes'][0]
 
 
 
86
  except:
87
  return None
88
 
@@ -251,7 +254,7 @@ def return_bookdata(querry,data):
251
  model="tiiuae/falcon-11b",
252
  messages=[
253
  {"role": "system", "content": "You are an assistant."},
254
- {"role": "user", "content": f"My finance plan data is {data}.do what user is telling. user:{querry}.Give the finance format of finance data in points"},
255
  ],
256
  stream=True,
257
  ):
 
82
  api_key="oF1aC4b1FBCDtK8CoKx7"
83
  )
84
  result = CLIENT.infer(filepath, model_id="plant-disease-detection-iefbi/1")
85
+ a= result['predicted_classes'][0]
86
+ if a=='x':
87
+ return 'APHIDS'
88
+ return a
89
  except:
90
  return None
91
 
 
254
  model="tiiuae/falcon-11b",
255
  messages=[
256
  {"role": "system", "content": "You are an assistant."},
257
+ {"role": "user", "content": f"My notes data is {data}.do what user is telling. user:{querry.replace('bookkeeping','data')}.Give the format of bookkeeping data in points"},
258
  ],
259
  stream=True,
260
  ):