Spaces:
Runtime error
Runtime error
added error msg
Browse files
app.py
CHANGED
@@ -84,7 +84,11 @@ def main():
|
|
84 |
else:
|
85 |
# render masked language modeling table
|
86 |
mlm_result = mask_api(inputs=user_input)
|
87 |
-
|
|
|
|
|
|
|
|
|
88 |
mlm_df = pd.DataFrame(mlm_result)
|
89 |
mlm_df.drop(columns=["token", "token_str"], inplace=True)
|
90 |
mlm_df_styled = mlm_df.copy(deep=False)
|
@@ -109,4 +113,5 @@ def main():
|
|
109 |
display_table(sa_df_styled, "π€ By saying that, I guess you are feeling..")
|
110 |
|
111 |
|
112 |
-
|
|
|
|
84 |
else:
|
85 |
# render masked language modeling table
|
86 |
mlm_result = mask_api(inputs=user_input)
|
87 |
+
|
88 |
+
if mlm_result == None:
|
89 |
+
st.write("Model is loading. Please try again later...")
|
90 |
+
return
|
91 |
+
|
92 |
mlm_df = pd.DataFrame(mlm_result)
|
93 |
mlm_df.drop(columns=["token", "token_str"], inplace=True)
|
94 |
mlm_df_styled = mlm_df.copy(deep=False)
|
|
|
113 |
display_table(sa_df_styled, "π€ By saying that, I guess you are feeling..")
|
114 |
|
115 |
|
116 |
+
if __name__ == "__main__":
|
117 |
+
main()
|