Spaces:
Runtime error
Runtime error
File size: 647 Bytes
fc2385b 0c954ca fc2385b |
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 31 |
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("Scraping 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()
|