Dimitre commited on
Commit
058e4f4
·
1 Parent(s): 63d003c

Removing examples

Browse files
Files changed (1) hide show
  1. app.py +3 -2
app.py CHANGED
@@ -17,6 +17,8 @@ def model_fn(preprocessor, encoder):
17
  return tf.keras.Model(text_input, pooled_output)
18
 
19
  def predict_fn(text):
 
 
20
  embed = model(tf.constant([text]))[0].numpy()
21
  return embed
22
 
@@ -26,6 +28,5 @@ model = model_fn(preprocessor, encoder)
26
 
27
  iface = gr.Interface(fn=predict_fn,
28
  inputs=gr.Textbox(lines=2, placeholder="Text input here...", label="Text"),
29
- outputs="text",
30
- examples=[["Hello! This is a random sentence"]])
31
  iface.launch()
 
17
  return tf.keras.Model(text_input, pooled_output)
18
 
19
  def predict_fn(text):
20
+ print(text)
21
+ print(tf.constant([text]))
22
  embed = model(tf.constant([text]))[0].numpy()
23
  return embed
24
 
 
28
 
29
  iface = gr.Interface(fn=predict_fn,
30
  inputs=gr.Textbox(lines=2, placeholder="Text input here...", label="Text"),
31
+ outputs="text")
 
32
  iface.launch()