Spaces:
Build error
Build error
anuragshas
commited on
Commit
•
30b774c
1
Parent(s):
7028ae7
Update app.py
Browse files
app.py
CHANGED
@@ -34,13 +34,13 @@ if 'models_loaded' not in st.session_state:
|
|
34 |
|
35 |
def get_correction(input_text):
|
36 |
'''Invokes the inference service'''
|
|
|
|
|
37 |
correct_request = "http://0.0.0.0:8080/restore?input_sentence="+input_text
|
38 |
correct_response = requests.get(correct_request)
|
39 |
correct_json = json.loads(correct_response.text)
|
40 |
corrected_sentence = correct_json["corrected_sentence"]
|
41 |
result = diff_strings(corrected_sentence,input_text)
|
42 |
-
st.markdown(f'##### Corrected text:')
|
43 |
-
st.write('')
|
44 |
st.markdown(result, unsafe_allow_html=True)
|
45 |
|
46 |
def diff_strings(output_text, input_text):
|
|
|
34 |
|
35 |
def get_correction(input_text):
|
36 |
'''Invokes the inference service'''
|
37 |
+
st.markdown(f'##### Corrected text:')
|
38 |
+
st.write('')
|
39 |
correct_request = "http://0.0.0.0:8080/restore?input_sentence="+input_text
|
40 |
correct_response = requests.get(correct_request)
|
41 |
correct_json = json.loads(correct_response.text)
|
42 |
corrected_sentence = correct_json["corrected_sentence"]
|
43 |
result = diff_strings(corrected_sentence,input_text)
|
|
|
|
|
44 |
st.markdown(result, unsafe_allow_html=True)
|
45 |
|
46 |
def diff_strings(output_text, input_text):
|