Chatbot / app.py
ImpactInsights's picture
Update app.py
4d82f11 verified
raw
history blame
No virus
1.01 kB
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.
Want to learn more about food insecurity, its causes, or potential solutions?")
#Sidebar menu
st.sidebar.title('Settings')
time_series = st.sidebar.subheader('Time Series Data')
chatbot = st.sidebar.subheader('Chatbot')
with 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")
with 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.json(out)