NCTCMumbai
commited on
Upload fun_advaitbert.py
Browse files- fun_advaitbert.py +8 -3
fun_advaitbert.py
CHANGED
@@ -213,10 +213,15 @@ def predict_CTH(txt):
|
|
213 |
|
214 |
try:
|
215 |
pred_duty=df_report_DUTY[df_report_DUTY['CTH']==str(pred_CTH)]['DUTY_RATE'].iloc[0]
|
|
|
|
|
|
|
|
|
|
|
|
|
216 |
pred_desc=df_report[df_report['CTH Code']==str(pred_CTH)]['Concat Description'].iloc[0]
|
217 |
except:
|
218 |
pred_desc=''
|
219 |
-
pred_duty=''
|
220 |
pass
|
221 |
|
222 |
Var_CTH.append(pred_CTH)
|
@@ -257,7 +262,7 @@ def predict_CTH(txt):
|
|
257 |
f'9. {P9} {Q9} '
|
258 |
f'10. {P10} {Q10}')
|
259 |
|
260 |
-
print('output_str_msg',output_str_msg)
|
261 |
|
262 |
return {str(P1):float(val_1),str(Q1):float(val_1),
|
263 |
str(P2):float(val_2),str(Q2):float(val_2),
|
@@ -279,7 +284,7 @@ def llm_model_function(txt,history,chatbot=[], temperature=0.9, max_new_tokens=1
|
|
279 |
|
280 |
global output_str_msg
|
281 |
|
282 |
-
print('output_str_msg',output_str_msg)
|
283 |
|
284 |
if output_str_msg!='Not a adequate description':
|
285 |
|
|
|
213 |
|
214 |
try:
|
215 |
pred_duty=df_report_DUTY[df_report_DUTY['CTH']==str(pred_CTH)]['DUTY_RATE'].iloc[0]
|
216 |
+
except:
|
217 |
+
pred_duty=''
|
218 |
+
pass
|
219 |
+
|
220 |
+
|
221 |
+
try:
|
222 |
pred_desc=df_report[df_report['CTH Code']==str(pred_CTH)]['Concat Description'].iloc[0]
|
223 |
except:
|
224 |
pred_desc=''
|
|
|
225 |
pass
|
226 |
|
227 |
Var_CTH.append(pred_CTH)
|
|
|
262 |
f'9. {P9} {Q9} '
|
263 |
f'10. {P10} {Q10}')
|
264 |
|
265 |
+
#print('output_str_msg',output_str_msg)
|
266 |
|
267 |
return {str(P1):float(val_1),str(Q1):float(val_1),
|
268 |
str(P2):float(val_2),str(Q2):float(val_2),
|
|
|
284 |
|
285 |
global output_str_msg
|
286 |
|
287 |
+
#print('output_str_msg',output_str_msg)
|
288 |
|
289 |
if output_str_msg!='Not a adequate description':
|
290 |
|