raynardj commited on
Commit
e65a26c
•
1 Parent(s): 6e0dbb8

🪕 baseline

Browse files

Files changed (3) hide show
  1. README.md +1 -1
  2. app.py +5 -5
  3. requirements.txt +2 -0
README.md CHANGED
@@ -5,7 +5,7 @@ colorFrom: blue
5
  colorTo: cyan
6
  sdk: streamlit
7
  app_file: app.py
8
- pinned: false
9
  ---
10
 
11
  ## 随无涯
5
  colorTo: cyan
6
  sdk: streamlit
7
  app_file: app.py
8
+ pinned: true
9
  ---
10
 
11
  ## 随无涯
app.py CHANGED
@@ -160,13 +160,13 @@ def display_tree(sub_list):
160
 
161
  display_tree(fetch_from_df(st.session_state.pathway))
162
 
163
- cc = st.text_area("【输入文本】", height=150)
164
 
165
- if st.button("【翻译】"):
166
  if cc:
167
  if len(cc)>168:
168
- st.write(f"句子太长,最多168个字符")
169
  else:
170
- st.markdown(f"""```{inference(cc)}```""")
171
  else:
172
- st.write("请输入文本")
160
 
161
  display_tree(fetch_from_df(st.session_state.pathway))
162
 
163
+ cc = col2.text_area("【输入文本】", height=150)
164
 
165
+ if col2.button("【翻译】"):
166
  if cc:
167
  if len(cc)>168:
168
+ col2.write(f"句子太长,最多168个字符")
169
  else:
170
+ col2.markdown(f"""```{inference(cc)}```""")
171
  else:
172
+ col2.write("请输入文本")
requirements.txt ADDED
@@ -0,0 +1,2 @@
 
 
1
+ transformers==4.12.3
2
+ torch==1.7.1