Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -5,6 +5,8 @@ import torch
|
|
| 5 |
|
| 6 |
#Dashboard Title
|
| 7 |
st.title("Food Security in Africa and Asia")
|
|
|
|
|
|
|
| 8 |
|
| 9 |
#Sidebar menu
|
| 10 |
st.sidebar.title('Settings')
|
|
@@ -12,20 +14,16 @@ time_series = st.sidebar.subheader('Time Series Data')
|
|
| 12 |
chatbot = st.sidebar.subheader('Chatbot')
|
| 13 |
|
| 14 |
|
| 15 |
-
|
| 16 |
-
|
|
|
|
| 17 |
|
| 18 |
-
|
|
|
|
| 19 |
pipe = pipeline("sentiment-analysis")
|
| 20 |
-
text = st.text_area("
|
| 21 |
|
| 22 |
if text:
|
| 23 |
out = pipe(text)
|
| 24 |
st.json(out)
|
| 25 |
-
|
| 26 |
-
#check_box = st.sidebar.checkbox(label = 'Display Data')
|
| 27 |
-
|
| 28 |
-
|
| 29 |
-
|
| 30 |
-
|
| 31 |
|
|
|
|
| 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
|
| 12 |
st.sidebar.title('Settings')
|
|
|
|
| 14 |
chatbot = st.sidebar.subheader('Chatbot')
|
| 15 |
|
| 16 |
|
| 17 |
+
with 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 |
+
with 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.json(out)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 29 |
|