Spaces:
Sleeping
Sleeping
File size: 1,006 Bytes
1586e72 5d25df8 1586e72 0dac12d e21752a 54cd3bc 45a5935 0dac12d e21752a 0dac12d 66dbbb4 0dac12d 54cd3bc 4d82f11 0dac12d 54cd3bc 4d82f11 e21752a 4d82f11 e21752a 54cd3bc 0dac12d |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 |
import streamlit as st
from transformers import pipeline
import torch
#Dashboard Title
st.title("Food Security in Africa and Asia")
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"
"Want to learn more about food insecurity, its causes, or potential solutions?")
#Sidebar menu
st.sidebar.title('Settings')
time_series = st.sidebar.checkbox('Time Series Data')
chatbot = st.sidebar.checkbox('Chatbot')
if time_series:
st.header("Time series data from 2000 to 2022")
st.text("This data was collected from trusted organizations and depict metrcis on food security based on climate change and food produduced")
if chatbot:
st.header("Chat with me!")
pipe = pipeline("sentiment-analysis")
text = st.text_area("Food security is a global challenge. Let's work together to find solutions. How can I help you today?")
if text:
out = pipe(text)
st.write(out)
|