gopikrsmscs yashwanth-javvaji commited on
Commit
13068dd
β€’
1 Parent(s): 61ccd6c

Update app.py (#2)

Browse files

- Update app.py (473be08aa729a9e85c01ba325980a9fbc03ab53a)


Co-authored-by: Yashwanth Javvaji <yashwanth-javvaji@users.noreply.huggingface.co>

Files changed (1) hide show
  1. app.py +2 -5
app.py CHANGED
@@ -14,7 +14,7 @@ form = st.form("Search for Similar Issues")
14
  text_input = form.text_area("Please enter the issue details",
15
  help="Title and description of the issue could be a good start!")
16
 
17
- if form.form_submit_button():
18
  # Perform semantic search
19
  query_embedding = embedder.encode(text_input, convert_to_tensor=True)
20
  corpus_embeddings = torch.load('saved_corpus.pt')
@@ -26,8 +26,5 @@ if form.form_submit_button():
26
 
27
  # Display results
28
  st.subheader("Top 5 Similar Issues")
29
- st.divider()
30
  for score, idx in zip(top_results[0], top_results[1]):
31
- st.write(corpus_embeddings_name[idx])
32
- st.progress(score.item(), f"Score: {score:.4f}")
33
- st.divider()
 
14
  text_input = form.text_area("Please enter the issue details",
15
  help="Title and description of the issue could be a good start!")
16
 
17
+ if form.form_submit_button("Run Inference"):
18
  # Perform semantic search
19
  query_embedding = embedder.encode(text_input, convert_to_tensor=True)
20
  corpus_embeddings = torch.load('saved_corpus.pt')
 
26
 
27
  # Display results
28
  st.subheader("Top 5 Similar Issues")
 
29
  for score, idx in zip(top_results[0], top_results[1]):
30
+ st.progress(score.item(), f"Issue: {corpus_embeddings_name[idx]}, Score: {score:.4f}")