Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -87,6 +87,12 @@ with st.form(key="my_form"):
|
|
87 |
doc = st.text_area(
|
88 |
"Paste your text below",
|
89 |
height=510,
|
|
|
|
|
|
|
|
|
|
|
|
|
90 |
)
|
91 |
|
92 |
submit_button = st.form_submit_button(label="๐ Go to split!")
|
@@ -98,30 +104,27 @@ if not submit_button:
|
|
98 |
keywords = run_segbot.generate(doc, model, fm, index, split_method)
|
99 |
|
100 |
|
101 |
-
st.markdown("##
|
102 |
|
103 |
st.header("")
|
104 |
|
105 |
|
106 |
cs, c1, c2, c3, cLast = st.columns([2, 1.5, 1.5, 1.5, 2])
|
107 |
|
108 |
-
with c1:
|
109 |
-
CSVButton2 = download_button(keywords, "Data.csv", "๐ฅ Download (.csv)")
|
110 |
-
with c2:
|
111 |
-
CSVButton2 = download_button(keywords, "Data.txt", "๐ฅ Download (.txt)")
|
112 |
-
with c3:
|
113 |
-
CSVButton2 = download_button(keywords, "Data.json", "๐ฅ Download (.json)")
|
114 |
-
|
115 |
st.header("")
|
116 |
|
117 |
-
#df = DataFrame(keywords, columns=["Keyword/Keyphrase", "Relevancy"])
|
118 |
df = DataFrame(keywords)
|
119 |
df.index += 1
|
120 |
df.columns = ['Segment']
|
121 |
print(df)
|
122 |
-
# Add styling
|
123 |
|
124 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
125 |
|
126 |
#with c2:
|
127 |
st.table(df)
|
|
|
87 |
doc = st.text_area(
|
88 |
"Paste your text below",
|
89 |
height=510,
|
90 |
+
placeholder="""
|
91 |
+
ใฐใฉใ ๆ่ฒใใใๆใใใช่ใ่ฆใคใใใใ ้ซๆถฒๅน้คใงใๅชไฝใช่ใฏๅน้คใใใชใใฃใใ
|
92 |
+
็ดฐ่ๆง้ซ่็ใซๅฏพใใใฐใฉใ ๆ่ฒใฎๆๅบฆใฏ60%็จๅบฆใงใใใๅน้คใซ้ขใใฆใๆๅบฆใฏ้ซใใชใใ
|
93 |
+
ใพใ้ซๆถฒไธญใฎ็ณใฏใใๅฐใๆธใใฎใงใฏใชใใ ใใใใ็ขบๅฎ่จบๆญใฏใคใใชใใใฎใฎใๆใ็ใใใ็พๆฃใงใใฃใใ
|
94 |
+
่ตทๅ ่ใฏMRSA,่
ธๅ
็ดฐ่็ญใๅบๅใซใซใใผใใใใใใณใณใใคใทใณ,ใกใญใใใ (้ซ่็dose)ใจใใใ
|
95 |
+
"""
|
96 |
)
|
97 |
|
98 |
submit_button = st.form_submit_button(label="๐ Go to split!")
|
|
|
104 |
keywords = run_segbot.generate(doc, model, fm, index, split_method)
|
105 |
|
106 |
|
107 |
+
st.markdown("## Results")
|
108 |
|
109 |
st.header("")
|
110 |
|
111 |
|
112 |
cs, c1, c2, c3, cLast = st.columns([2, 1.5, 1.5, 1.5, 2])
|
113 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
114 |
st.header("")
|
115 |
|
|
|
116 |
df = DataFrame(keywords)
|
117 |
df.index += 1
|
118 |
df.columns = ['Segment']
|
119 |
print(df)
|
|
|
120 |
|
121 |
+
|
122 |
+
with c1:
|
123 |
+
CSVButton2 = download_button(keywords, "Data.csv", "๐ฅ Download (.csv)")
|
124 |
+
with c2:
|
125 |
+
CSVButton2 = download_button(keywords, "Data.txt", "๐ฅ Download (.txt)")
|
126 |
+
with c3:
|
127 |
+
CSVButton2 = download_button(keywords, "Data.json", "๐ฅ Download (.json)")
|
128 |
|
129 |
#with c2:
|
130 |
st.table(df)
|