Download pp.py from Pezh/Sql: direct link, hf CLI and curl.
- Browser
- Download file 466 Bytes
-
https://huggingface.co/spaces/Pezh/Sql/resolve/main/pp.py
- Command line
-
hf download hf://spaces/Pezh/Sql/pp.py
-
curl -L -o pp.py https://huggingface.co/spaces/Pezh/Sql/resolve/main/pp.py
466 Bytes
| import streamlit as st | |
| import requests | |
| st.title('SQL Database Interaction') | |
| text_input = st.text_input('Enter some text') | |
| save_button = st.button('Save to Database') | |
| if save_button: | |
| url = 'http://beautyscale.ir/save_data.php' | |
| data = {'text_input': text_input} | |
| response = requests.post(url, data=data) | |
| if response.status_code == 200: | |
| st.success('Data saved to the database on Server B!') | |
| else: | |
| st.error('Error saving data') |