ajitrajasekharan commited on
Commit
afd47cf
·
1 Parent(s): 9874d12

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -3
app.py CHANGED
@@ -2,7 +2,7 @@ import time
2
  import streamlit as st
3
  import torch
4
  import string
5
- import json
6
 
7
  from transformers import BertTokenizer, BertForMaskedLM
8
 
@@ -91,8 +91,8 @@ try:
91
  start = time.time()
92
  try:
93
  res = get_bert_prediction(input_text,top_k)
94
- st.header("JSON:")
95
- st.json(json.dumps(res,indent=4))
96
 
97
  except Exception as e:
98
  st.error("Some error occurred during prediction" + str(e))
 
2
  import streamlit as st
3
  import torch
4
  import string
5
+
6
 
7
  from transformers import BertTokenizer, BertForMaskedLM
8
 
 
91
  start = time.time()
92
  try:
93
  res = get_bert_prediction(input_text,top_k)
94
+ st.caption("Results in JSON")
95
+ st.json(res)
96
 
97
  except Exception as e:
98
  st.error("Some error occurred during prediction" + str(e))