Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -5,7 +5,7 @@ import torch
|
|
| 5 |
|
| 6 |
#Dashboard Title
|
| 7 |
st.title("Food Security in Africa and Asia")
|
| 8 |
-
st.text("Hi there! I'm your food security assistant. Food security means everyone has access to safe, nutritious food to meet their dietary needs
|
| 9 |
"Want to learn more about food insecurity, its causes, or potential solutions?")
|
| 10 |
|
| 11 |
#Sidebar menu
|
|
@@ -14,16 +14,16 @@ time_series = st.sidebar.subheader('Time Series Data')
|
|
| 14 |
chatbot = st.sidebar.subheader('Chatbot')
|
| 15 |
|
| 16 |
|
| 17 |
-
|
| 18 |
st.header("Time series data from 2000 to 2022")
|
| 19 |
st.text("This data was collected from trusted organizations and depict metrcis on food security based on climate change and food produduced")
|
| 20 |
|
| 21 |
-
|
| 22 |
st.header("Chat with me!")
|
| 23 |
pipe = pipeline("sentiment-analysis")
|
| 24 |
text = st.text_area("Food security is a global challenge. Let's work together to find solutions. How can I help you today?")
|
| 25 |
|
| 26 |
if text:
|
| 27 |
out = pipe(text)
|
| 28 |
-
st.
|
| 29 |
|
|
|
|
| 5 |
|
| 6 |
#Dashboard Title
|
| 7 |
st.title("Food Security in Africa and Asia")
|
| 8 |
+
st.text("Hi there! I'm your food security assistant. Food security means everyone has access to safe, nutritious food to meet their dietary needs.\n"
|
| 9 |
"Want to learn more about food insecurity, its causes, or potential solutions?")
|
| 10 |
|
| 11 |
#Sidebar menu
|
|
|
|
| 14 |
chatbot = st.sidebar.subheader('Chatbot')
|
| 15 |
|
| 16 |
|
| 17 |
+
if time_series:
|
| 18 |
st.header("Time series data from 2000 to 2022")
|
| 19 |
st.text("This data was collected from trusted organizations and depict metrcis on food security based on climate change and food produduced")
|
| 20 |
|
| 21 |
+
if chatbot:
|
| 22 |
st.header("Chat with me!")
|
| 23 |
pipe = pipeline("sentiment-analysis")
|
| 24 |
text = st.text_area("Food security is a global challenge. Let's work together to find solutions. How can I help you today?")
|
| 25 |
|
| 26 |
if text:
|
| 27 |
out = pipe(text)
|
| 28 |
+
st.write(out)
|
| 29 |
|