fixing model with eval on deployment
Browse files- README.md +10 -0
- main_deploy.py +1 -0
README.md
CHANGED
@@ -1,3 +1,13 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
# Idiomify
|
2 |
[](https://share.streamlit.io/eubinecto/idiomify/issue_2/main_deploy.py)
|
3 |
|
|
|
1 |
+
---
|
2 |
+
title: Idiomify demo
|
3 |
+
emoji: ✍️
|
4 |
+
colorFrom: yellow
|
5 |
+
colorTo: orange
|
6 |
+
sdk: streamlit
|
7 |
+
app_file: main_deploy.py
|
8 |
+
pinned: false
|
9 |
+
---
|
10 |
+
|
11 |
# Idiomify
|
12 |
[](https://share.streamlit.io/eubinecto/idiomify/issue_2/main_deploy.py)
|
13 |
|
main_deploy.py
CHANGED
@@ -21,6 +21,7 @@ def fetch_resources() -> Tuple[dict, Idiomifier, BartTokenizer, List[str]]:
|
|
21 |
def main():
|
22 |
# fetch a pre-trained model
|
23 |
config, model, tokenizer, idioms = fetch_resources()
|
|
|
24 |
pipeline = Pipeline(model, tokenizer)
|
25 |
st.title("Idiomify Demo")
|
26 |
st.markdown(f"Author: `Eu-Bin KIM`")
|
|
|
21 |
def main():
|
22 |
# fetch a pre-trained model
|
23 |
config, model, tokenizer, idioms = fetch_resources()
|
24 |
+
model.eval()
|
25 |
pipeline = Pipeline(model, tokenizer)
|
26 |
st.title("Idiomify Demo")
|
27 |
st.markdown(f"Author: `Eu-Bin KIM`")
|