Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -19,16 +19,6 @@ st.write("automative reply")
|
|
| 19 |
# Text input for user to enter the comment
|
| 20 |
text = st.text_area("Enter your comment", "")
|
| 21 |
|
| 22 |
-
def main():
|
| 23 |
-
user_review = "I love the fast delivery, but the product quality could be better."
|
| 24 |
-
response = response_gen(user_review)
|
| 25 |
-
print(response)
|
| 26 |
-
sound_gen(response)
|
| 27 |
-
return
|
| 28 |
-
|
| 29 |
-
|
| 30 |
-
if st.button("Comment"):
|
| 31 |
-
|
| 32 |
##########################################
|
| 33 |
# Step 1:情感分析 - 分析用户评论的情感倾向
|
| 34 |
##########################################
|
|
@@ -200,6 +190,12 @@ def sound_gen(response):
|
|
| 200 |
st.text("I wanna tell you that")
|
| 201 |
st.audio("customer_service_response.wav")
|
| 202 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 203 |
|
| 204 |
if __name__ == "__main__":
|
| 205 |
main()
|
|
|
|
| 19 |
# Text input for user to enter the comment
|
| 20 |
text = st.text_area("Enter your comment", "")
|
| 21 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 22 |
##########################################
|
| 23 |
# Step 1:情感分析 - 分析用户评论的情感倾向
|
| 24 |
##########################################
|
|
|
|
| 190 |
st.text("I wanna tell you that")
|
| 191 |
st.audio("customer_service_response.wav")
|
| 192 |
|
| 193 |
+
def main():
|
| 194 |
+
user_review = "I love the fast delivery, but the product quality could be better."
|
| 195 |
+
response = response_gen(user_review)
|
| 196 |
+
print(response)
|
| 197 |
+
sound_gen(response)
|
| 198 |
+
return
|
| 199 |
|
| 200 |
if __name__ == "__main__":
|
| 201 |
main()
|