Download app.py from Mudditha/mh: direct link, hf CLI and curl.
- Browser
- Download file 2.11 kB
-
https://huggingface.co/spaces/Mudditha/mh/resolve/main/app.py
- Command line
-
hf download hf://spaces/Mudditha/mh/app.py
-
curl -L -o app.py https://huggingface.co/spaces/Mudditha/mh/resolve/main/app.py
2.11 kB
| import streamlit as st | |
| def main(): | |
| css_dark_mode = """ | |
| <style> | |
| body { | |
| background-color: #121212; | |
| color: #f8f9fa; | |
| font-family: Arial, sans-serif; | |
| } | |
| .header { | |
| background: linear-gradient(90deg, #005c97, #363795); | |
| padding: 15px; | |
| margin-bottom: 15px; | |
| border-radius: 10px; | |
| box-shadow: 0px 4px 8px rgba(0, 0, 0, 0.2); | |
| text-align: center; | |
| } | |
| .header h1 { | |
| color: #ffffff; | |
| font-size: 36px; | |
| } | |
| .header h2 { | |
| color: #b0b0b0; | |
| font-size: 22px; | |
| font-family: Georgia, serif; | |
| } | |
| .stButton > button { | |
| background-color: #20c997; | |
| color: #ffffff; | |
| border: none; | |
| border-radius: 8px; | |
| padding: 10px 20px; | |
| font-size: 16px; | |
| cursor: pointer; | |
| transition: background-color 0.3s; | |
| } | |
| .stButton > button:hover { | |
| background-color: #17a589; | |
| } | |
| .success-box { | |
| background-color: #A1D6CB; | |
| padding: 10px; | |
| margin: 10px 0; | |
| border-radius: 8px; | |
| box-shadow: 0px 4px 8px rgba(0, 0, 0, 0.2); | |
| } | |
| </style> | |
| """ | |
| # Inject the custom CSS | |
| st.markdown(css_dark_mode, unsafe_allow_html=True) | |
| # Header Section | |
| html_temp = """ | |
| <div class="header"> | |
| <h1>Dominious</h1> | |
| <h2>AI Based Domain Name Suggestion System</h2> | |
| </div> | |
| """ | |
| st.markdown(html_temp, unsafe_allow_html=True) | |
| # st.title("Domain Name Suggestion System") | |
| # Get user input | |
| context = st.text_input("Describe your business here...") | |
| # Generate the response | |
| if st.button("Generate"): | |
| with st.spinner("Generating Domain Names..."): | |
| result = '\n1. GreenGrocer\n2. VeggieVault\n3. PlantPick\n4. HarvestHub\n5. VeggieVault\n6. FreshFeast\n7. VeggieVault\n8. GreenGrocer\n9. HarvestHub\n10. FreshFeast' | |
| st.write(result) | |
| if __name__ == "__main__": | |
| main() |