Arhashmi's picture
Upload 4 files
fc2385b
raw
history blame
660 Bytes
import streamlit as st
from scrape import scrape_data_from_url
import response
data = "No data"
url = ""
def main():
global data
global url
st.title("Web Scraping and Chat App")
url = st.text_input("Enter URL:")
if st.button("Scrape Data"):
data = scrape_data_from_url(url)
st.success("Data scraped successfully!")
st.subheader("Scraped Data:")
st.write(data)
user_input = st.text_input("Enter your message:")
if st.button("Send"):
bot_response = response.get_response(user_input, data)
st.success("Bot Response:")
st.write(bot_response)
if __name__ == '__main__':
main()