Alien-Y commited on
Commit
c3de03c
·
1 Parent(s): ee4f454

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -25,7 +25,7 @@ model = keras.models.load_model('model')
25
  # parameters
26
  max_len = 20
27
 
28
- question = st.text_area('اسأل سؤال....')
29
 
30
  result = model.predict(keras.preprocessing.sequence.pad_sequences(tokenizer.texts_to_sequences([question]),
31
  truncating='post', maxlen=max_len))
@@ -35,4 +35,4 @@ tag = lbl_encoder.inverse_transform([np.argmax(result)])
35
  for i in data['intents']:
36
  if i['tag'] == tag:
37
  out = np.random.choice(i['responses'])
38
- st.json(out)
 
25
  # parameters
26
  max_len = 20
27
 
28
+ question = st.text_area('....اسأل سؤال')
29
 
30
  result = model.predict(keras.preprocessing.sequence.pad_sequences(tokenizer.texts_to_sequences([question]),
31
  truncating='post', maxlen=max_len))
 
35
  for i in data['intents']:
36
  if i['tag'] == tag:
37
  out = np.random.choice(i['responses'])
38
+ st.json(json.parse(out))