Pouya commited on
Commit
efc7d60
·
verified ·
1 Parent(s): e0c1be3

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +20 -20
app.py CHANGED
@@ -217,31 +217,31 @@ def is_greeting(input_str):
217
  return any(greet in input_str.lower() for greet in greetings)
218
 
219
 
220
- def chatbot(input_str):
221
- # Check if the input is a greeting
222
- if is_greeting(input_str):
223
- # Respond with a greeting message
224
- return "Hello! Ask me your question about Italian Divorce or Inheritance Law?"
225
- else:
226
- # Process the input as a question
227
- response = chatbot1(input_str)
228
- if response == "N/A":
229
- return "I'm sorry, I'm having trouble understanding your question. Could you please rephrase it or provide more context"
230
- else:
231
- return response
232
 
233
 
234
 
235
 
236
- ### If you wanna disable Greeting in the chatbot, use this code:
237
 
238
- # def chatbot(input_str):
239
- # # Directly process every input as a question
240
- # response = chatbot1(input_str)
241
- # if response == "N/A":
242
- # return "I'm sorry, I'm having trouble understanding your question. Could you please rephrase it or provide more context"
243
- # else:
244
- # return response
245
 
246
 
247
 
 
217
  return any(greet in input_str.lower() for greet in greetings)
218
 
219
 
220
+ # def chatbot(input_str):
221
+ # # Check if the input is a greeting
222
+ # if is_greeting(input_str):
223
+ # # Respond with a greeting message
224
+ # return "Hello! Ask me your question about Italian Divorce or Inheritance Law?"
225
+ # else:
226
+ # # Process the input as a question
227
+ # response = chatbot1(input_str)
228
+ # if response == "N/A":
229
+ # return "I'm sorry, I'm having trouble understanding your question. Could you please rephrase it or provide more context"
230
+ # else:
231
+ # return response
232
 
233
 
234
 
235
 
236
+ ## If you wanna disable Greeting in the chatbot, use this code:
237
 
238
+ def chatbot(input_str):
239
+ # Directly process every input as a question
240
+ response = chatbot1(input_str)
241
+ if response == "N/A":
242
+ return "I'm sorry, I'm having trouble understanding your question. Could you please rephrase it or provide more context"
243
+ else:
244
+ return response
245
 
246
 
247