Rakesh30 commited on
Commit
d9d1320
·
1 Parent(s): 55ab30c

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -79,10 +79,10 @@ def get_top_k_matches(np_array,k,sentences):
79
  import pandas as pd
80
  df=pd.DataFrame({"Title":dataset['train']['Title'],"Plot":dataset['train']['Overview']})
81
 
82
- def getOutput(text, size):
83
  sentences=get_pre_processed_data(int(size))
84
  np_array=getSimilarity(sentences,[text])
85
  return df.iloc[get_top_k_matches(np_array,2,sentences)]
86
 
87
- iface = gr.Interface(fn=getOutput, inputs=[gr.inputs.Textbox(label="Text"), gr.inputs.Number(label="size")], outputs="text")
88
  iface.launch(debug=True)
 
79
  import pandas as pd
80
  df=pd.DataFrame({"Title":dataset['train']['Title'],"Plot":dataset['train']['Overview']})
81
 
82
+ def getOutput(text, size=1000):
83
  sentences=get_pre_processed_data(int(size))
84
  np_array=getSimilarity(sentences,[text])
85
  return df.iloc[get_top_k_matches(np_array,2,sentences)]
86
 
87
+ iface = gr.Interface(fn=getOutput, inputs=[gr.inputs.Textbox(label="Text")], outputs="text")
88
  iface.launch(debug=True)