Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -2,24 +2,26 @@ import streamlit as st
|
|
| 2 |
from transformers import pipeline
|
| 3 |
import torch
|
| 4 |
|
| 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
|
| 12 |
-
st.sidebar.title('
|
|
|
|
|
|
|
| 13 |
time_series = st.sidebar.checkbox('Time Series Data')
|
| 14 |
chatbot = st.sidebar.checkbox('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 |
|
|
|
|
| 2 |
from transformers import pipeline
|
| 3 |
import torch
|
| 4 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 5 |
#Sidebar menu
|
| 6 |
+
st.sidebar.title('Menu')
|
| 7 |
+
|
| 8 |
+
home = st.sidebar.checkbox("Home")
|
| 9 |
time_series = st.sidebar.checkbox('Time Series Data')
|
| 10 |
chatbot = st.sidebar.checkbox('Chatbot')
|
| 11 |
|
| 12 |
+
if home:
|
| 13 |
+
st.title("Food Security in Africa and Asia")
|
| 14 |
+
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"
|
| 15 |
+
"Want to learn more about food insecurity, its causes, or potential solutions?")
|
| 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 |
+
|
| 22 |
if chatbot:
|
| 23 |
+
st.header("Chat with me.")
|
| 24 |
+
|
| 25 |
pipe = pipeline("sentiment-analysis")
|
| 26 |
text = st.text_area("Food security is a global challenge. Let's work together to find solutions. How can I help you today?")
|
| 27 |
|