Spaces:
Running
Running
Upload 8 files
Browse files- .gitattributes +3 -35
- .gitignore +207 -0
- blog.py +37 -0
- requirements.txt +0 -0
- static/images/4K_8.mp4 +3 -0
- static/images/bg.jpg +3 -0
- static/style.css +79 -0
- templates/index.html +144 -0
.gitattributes
CHANGED
|
@@ -1,35 +1,3 @@
|
|
| 1 |
-
|
| 2 |
-
|
| 3 |
-
|
| 4 |
-
*.bz2 filter=lfs diff=lfs merge=lfs -text
|
| 5 |
-
*.ckpt filter=lfs diff=lfs merge=lfs -text
|
| 6 |
-
*.ftz filter=lfs diff=lfs merge=lfs -text
|
| 7 |
-
*.gz filter=lfs diff=lfs merge=lfs -text
|
| 8 |
-
*.h5 filter=lfs diff=lfs merge=lfs -text
|
| 9 |
-
*.joblib filter=lfs diff=lfs merge=lfs -text
|
| 10 |
-
*.lfs.* filter=lfs diff=lfs merge=lfs -text
|
| 11 |
-
*.mlmodel filter=lfs diff=lfs merge=lfs -text
|
| 12 |
-
*.model filter=lfs diff=lfs merge=lfs -text
|
| 13 |
-
*.msgpack filter=lfs diff=lfs merge=lfs -text
|
| 14 |
-
*.npy filter=lfs diff=lfs merge=lfs -text
|
| 15 |
-
*.npz filter=lfs diff=lfs merge=lfs -text
|
| 16 |
-
*.onnx filter=lfs diff=lfs merge=lfs -text
|
| 17 |
-
*.ot filter=lfs diff=lfs merge=lfs -text
|
| 18 |
-
*.parquet filter=lfs diff=lfs merge=lfs -text
|
| 19 |
-
*.pb filter=lfs diff=lfs merge=lfs -text
|
| 20 |
-
*.pickle filter=lfs diff=lfs merge=lfs -text
|
| 21 |
-
*.pkl filter=lfs diff=lfs merge=lfs -text
|
| 22 |
-
*.pt filter=lfs diff=lfs merge=lfs -text
|
| 23 |
-
*.pth filter=lfs diff=lfs merge=lfs -text
|
| 24 |
-
*.rar filter=lfs diff=lfs merge=lfs -text
|
| 25 |
-
*.safetensors filter=lfs diff=lfs merge=lfs -text
|
| 26 |
-
saved_model/**/* filter=lfs diff=lfs merge=lfs -text
|
| 27 |
-
*.tar.* filter=lfs diff=lfs merge=lfs -text
|
| 28 |
-
*.tar filter=lfs diff=lfs merge=lfs -text
|
| 29 |
-
*.tflite filter=lfs diff=lfs merge=lfs -text
|
| 30 |
-
*.tgz filter=lfs diff=lfs merge=lfs -text
|
| 31 |
-
*.wasm filter=lfs diff=lfs merge=lfs -text
|
| 32 |
-
*.xz filter=lfs diff=lfs merge=lfs -text
|
| 33 |
-
*.zip filter=lfs diff=lfs merge=lfs -text
|
| 34 |
-
*.zst filter=lfs diff=lfs merge=lfs -text
|
| 35 |
-
*tfevents* filter=lfs diff=lfs merge=lfs -text
|
|
|
|
| 1 |
+
/static/images/emo.gif filter=lfs diff=lfs merge=lfs -text
|
| 2 |
+
static/images/4K_8.mp4 filter=lfs diff=lfs merge=lfs -text
|
| 3 |
+
static/images/bg.jpg filter=lfs diff=lfs merge=lfs -text
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
.gitignore
ADDED
|
@@ -0,0 +1,207 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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 8 |
+
|
| 9 |
+
# Distribution / packaging
|
| 10 |
+
.Python
|
| 11 |
+
build/
|
| 12 |
+
develop-eggs/
|
| 13 |
+
dist/
|
| 14 |
+
downloads/
|
| 15 |
+
eggs/
|
| 16 |
+
.eggs/
|
| 17 |
+
lib/
|
| 18 |
+
lib64/
|
| 19 |
+
parts/
|
| 20 |
+
sdist/
|
| 21 |
+
var/
|
| 22 |
+
wheels/
|
| 23 |
+
share/python-wheels/
|
| 24 |
+
*.egg-info/
|
| 25 |
+
.installed.cfg
|
| 26 |
+
*.egg
|
| 27 |
+
MANIFEST
|
| 28 |
+
|
| 29 |
+
# PyInstaller
|
| 30 |
+
# Usually these files are written by a python script from a template
|
| 31 |
+
# before PyInstaller builds the exe, so as to inject date/other infos into it.
|
| 32 |
+
*.manifest
|
| 33 |
+
*.spec
|
| 34 |
+
|
| 35 |
+
# Installer logs
|
| 36 |
+
pip-log.txt
|
| 37 |
+
pip-delete-this-directory.txt
|
| 38 |
+
|
| 39 |
+
# Unit test / coverage reports
|
| 40 |
+
htmlcov/
|
| 41 |
+
.tox/
|
| 42 |
+
.nox/
|
| 43 |
+
.coverage
|
| 44 |
+
.coverage.*
|
| 45 |
+
.cache
|
| 46 |
+
nosetests.xml
|
| 47 |
+
coverage.xml
|
| 48 |
+
*.cover
|
| 49 |
+
*.py.cover
|
| 50 |
+
.hypothesis/
|
| 51 |
+
.pytest_cache/
|
| 52 |
+
cover/
|
| 53 |
+
|
| 54 |
+
# Translations
|
| 55 |
+
*.mo
|
| 56 |
+
*.pot
|
| 57 |
+
|
| 58 |
+
# Django stuff:
|
| 59 |
+
*.log
|
| 60 |
+
local_settings.py
|
| 61 |
+
db.sqlite3
|
| 62 |
+
db.sqlite3-journal
|
| 63 |
+
|
| 64 |
+
# Flask stuff:
|
| 65 |
+
instance/
|
| 66 |
+
.webassets-cache
|
| 67 |
+
|
| 68 |
+
# Scrapy stuff:
|
| 69 |
+
.scrapy
|
| 70 |
+
|
| 71 |
+
# Sphinx documentation
|
| 72 |
+
docs/_build/
|
| 73 |
+
|
| 74 |
+
# PyBuilder
|
| 75 |
+
.pybuilder/
|
| 76 |
+
target/
|
| 77 |
+
|
| 78 |
+
# Jupyter Notebook
|
| 79 |
+
.ipynb_checkpoints
|
| 80 |
+
|
| 81 |
+
# IPython
|
| 82 |
+
profile_default/
|
| 83 |
+
ipython_config.py
|
| 84 |
+
|
| 85 |
+
# pyenv
|
| 86 |
+
# For a library or package, you might want to ignore these files since the code is
|
| 87 |
+
# intended to run in multiple environments; otherwise, check them in:
|
| 88 |
+
# .python-version
|
| 89 |
+
|
| 90 |
+
# pipenv
|
| 91 |
+
# According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control.
|
| 92 |
+
# However, in case of collaboration, if having platform-specific dependencies or dependencies
|
| 93 |
+
# having no cross-platform support, pipenv may install dependencies that don't work, or not
|
| 94 |
+
# install all needed dependencies.
|
| 95 |
+
#Pipfile.lock
|
| 96 |
+
|
| 97 |
+
# UV
|
| 98 |
+
# Similar to Pipfile.lock, it is generally recommended to include uv.lock in version control.
|
| 99 |
+
# This is especially recommended for binary packages to ensure reproducibility, and is more
|
| 100 |
+
# commonly ignored for libraries.
|
| 101 |
+
#uv.lock
|
| 102 |
+
|
| 103 |
+
# poetry
|
| 104 |
+
# Similar to Pipfile.lock, it is generally recommended to include poetry.lock in version control.
|
| 105 |
+
# This is especially recommended for binary packages to ensure reproducibility, and is more
|
| 106 |
+
# commonly ignored for libraries.
|
| 107 |
+
# https://python-poetry.org/docs/basic-usage/#commit-your-poetrylock-file-to-version-control
|
| 108 |
+
#poetry.lock
|
| 109 |
+
#poetry.toml
|
| 110 |
+
|
| 111 |
+
# pdm
|
| 112 |
+
# Similar to Pipfile.lock, it is generally recommended to include pdm.lock in version control.
|
| 113 |
+
# pdm recommends including project-wide configuration in pdm.toml, but excluding .pdm-python.
|
| 114 |
+
# https://pdm-project.org/en/latest/usage/project/#working-with-version-control
|
| 115 |
+
#pdm.lock
|
| 116 |
+
#pdm.toml
|
| 117 |
+
.pdm-python
|
| 118 |
+
.pdm-build/
|
| 119 |
+
|
| 120 |
+
# pixi
|
| 121 |
+
# Similar to Pipfile.lock, it is generally recommended to include pixi.lock in version control.
|
| 122 |
+
#pixi.lock
|
| 123 |
+
# Pixi creates a virtual environment in the .pixi directory, just like venv module creates one
|
| 124 |
+
# in the .venv directory. It is recommended not to include this directory in version control.
|
| 125 |
+
.pixi
|
| 126 |
+
|
| 127 |
+
# PEP 582; used by e.g. github.com/David-OConnor/pyflow and github.com/pdm-project/pdm
|
| 128 |
+
__pypackages__/
|
| 129 |
+
|
| 130 |
+
# Celery stuff
|
| 131 |
+
celerybeat-schedule
|
| 132 |
+
celerybeat.pid
|
| 133 |
+
|
| 134 |
+
# SageMath parsed files
|
| 135 |
+
*.sage.py
|
| 136 |
+
|
| 137 |
+
# Environments
|
| 138 |
+
.env
|
| 139 |
+
.envrc
|
| 140 |
+
.venv
|
| 141 |
+
env/
|
| 142 |
+
venv/
|
| 143 |
+
ENV/
|
| 144 |
+
env.bak/
|
| 145 |
+
venv.bak/
|
| 146 |
+
|
| 147 |
+
# Spyder project settings
|
| 148 |
+
.spyderproject
|
| 149 |
+
.spyproject
|
| 150 |
+
|
| 151 |
+
# Rope project settings
|
| 152 |
+
.ropeproject
|
| 153 |
+
|
| 154 |
+
# mkdocs documentation
|
| 155 |
+
/site
|
| 156 |
+
|
| 157 |
+
# mypy
|
| 158 |
+
.mypy_cache/
|
| 159 |
+
.dmypy.json
|
| 160 |
+
dmypy.json
|
| 161 |
+
|
| 162 |
+
# Pyre type checker
|
| 163 |
+
.pyre/
|
| 164 |
+
|
| 165 |
+
# pytype static type analyzer
|
| 166 |
+
.pytype/
|
| 167 |
+
|
| 168 |
+
# Cython debug symbols
|
| 169 |
+
cython_debug/
|
| 170 |
+
|
| 171 |
+
# PyCharm
|
| 172 |
+
# JetBrains specific template is maintained in a separate JetBrains.gitignore that can
|
| 173 |
+
# be found at https://github.com/github/gitignore/blob/main/Global/JetBrains.gitignore
|
| 174 |
+
# and can be added to the global gitignore or merged into this file. For a more nuclear
|
| 175 |
+
# option (not recommended) you can uncomment the following to ignore the entire idea folder.
|
| 176 |
+
#.idea/
|
| 177 |
+
|
| 178 |
+
# Abstra
|
| 179 |
+
# Abstra is an AI-powered process automation framework.
|
| 180 |
+
# Ignore directories containing user credentials, local state, and settings.
|
| 181 |
+
# Learn more at https://abstra.io/docs
|
| 182 |
+
.abstra/
|
| 183 |
+
|
| 184 |
+
# Visual Studio Code
|
| 185 |
+
# Visual Studio Code specific template is maintained in a separate VisualStudioCode.gitignore
|
| 186 |
+
# that can be found at https://github.com/github/gitignore/blob/main/Global/VisualStudioCode.gitignore
|
| 187 |
+
# and can be added to the global gitignore or merged into this file. However, if you prefer,
|
| 188 |
+
# you could uncomment the following to ignore the entire vscode folder
|
| 189 |
+
# .vscode/
|
| 190 |
+
|
| 191 |
+
# Ruff stuff:
|
| 192 |
+
.ruff_cache/
|
| 193 |
+
|
| 194 |
+
# PyPI configuration file
|
| 195 |
+
.pypirc
|
| 196 |
+
|
| 197 |
+
# Cursor
|
| 198 |
+
# Cursor is an AI-powered code editor. `.cursorignore` specifies files/directories to
|
| 199 |
+
# exclude from AI features like autocomplete and code analysis. Recommended for sensitive data
|
| 200 |
+
# refer to https://docs.cursor.com/context/ignore-files
|
| 201 |
+
.cursorignore
|
| 202 |
+
.cursorindexingignore
|
| 203 |
+
|
| 204 |
+
# Marimo
|
| 205 |
+
marimo/_static/
|
| 206 |
+
marimo/_lsp/
|
| 207 |
+
__marimo__/
|
blog.py
ADDED
|
@@ -0,0 +1,37 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
from flask import Flask, render_template, request
|
| 2 |
+
from dotenv import load_dotenv
|
| 3 |
+
from huggingface_hub import InferenceClient
|
| 4 |
+
import os
|
| 5 |
+
|
| 6 |
+
# Load environment variables
|
| 7 |
+
load_dotenv()
|
| 8 |
+
|
| 9 |
+
# Hugging Face Inference Client
|
| 10 |
+
client = InferenceClient(api_key=os.getenv("TOKEN"))
|
| 11 |
+
|
| 12 |
+
app = Flask(__name__)
|
| 13 |
+
|
| 14 |
+
def generate_blog(paragraph_topic):
|
| 15 |
+
response = client.chat.completions.create(
|
| 16 |
+
model="HuggingFaceH4/zephyr-7b-beta",
|
| 17 |
+
messages=[
|
| 18 |
+
{
|
| 19 |
+
"role": "user",
|
| 20 |
+
"content": f"Write a paragraph about the following topic: {paragraph_topic}"
|
| 21 |
+
}
|
| 22 |
+
],
|
| 23 |
+
max_tokens=300, # prevent overly long text
|
| 24 |
+
)
|
| 25 |
+
return response.choices[0].message.content # ✅ fixed
|
| 26 |
+
|
| 27 |
+
@app.route("/", methods=["GET", "POST"])
|
| 28 |
+
def index():
|
| 29 |
+
paragraph = ""
|
| 30 |
+
if request.method == "POST":
|
| 31 |
+
topic = request.form["topic"]
|
| 32 |
+
paragraph = generate_blog(topic)
|
| 33 |
+
return render_template("index.html", paragraph=paragraph)
|
| 34 |
+
|
| 35 |
+
if __name__ == "__main__":
|
| 36 |
+
|
| 37 |
+
app.run(debug=True, host="0.0.0.0", port=int(os.environ.get("PORT", 5000)))
|
requirements.txt
ADDED
|
Binary file (124 Bytes). View file
|
|
|
static/images/4K_8.mp4
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:9eeef1deb29b314058ff4f08f16acd4fd3bc534e9cb4b024faf0c8df16d40191
|
| 3 |
+
size 18892450
|
static/images/bg.jpg
ADDED
|
Git LFS Details
|
static/style.css
ADDED
|
@@ -0,0 +1,79 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
body {
|
| 2 |
+
font-family: 'Segoe UI', Tahoma, sans-serif;
|
| 3 |
+
background: linear-gradient(120deg, #f2f4f7, #e6f0ff);
|
| 4 |
+
margin: 0;
|
| 5 |
+
padding: 0;
|
| 6 |
+
color: #333;
|
| 7 |
+
}
|
| 8 |
+
|
| 9 |
+
.container {
|
| 10 |
+
max-width: 720px;
|
| 11 |
+
margin: 60px auto;
|
| 12 |
+
background: #ffffff;
|
| 13 |
+
padding: 50px 40px;
|
| 14 |
+
border-radius: 12px;
|
| 15 |
+
box-shadow: 0 8px 24px rgba(0, 0, 0, 0.05);
|
| 16 |
+
transition: transform 0.2s ease;
|
| 17 |
+
}
|
| 18 |
+
|
| 19 |
+
.container:hover {
|
| 20 |
+
transform: scale(1.01);
|
| 21 |
+
}
|
| 22 |
+
|
| 23 |
+
h1 {
|
| 24 |
+
text-align: center;
|
| 25 |
+
color: #2c3e50;
|
| 26 |
+
font-size: 32px;
|
| 27 |
+
margin-bottom: 35px;
|
| 28 |
+
font-weight: 600;
|
| 29 |
+
}
|
| 30 |
+
|
| 31 |
+
form {
|
| 32 |
+
display: flex;
|
| 33 |
+
justify-content: center;
|
| 34 |
+
gap: 10px;
|
| 35 |
+
margin-bottom: 30px;
|
| 36 |
+
}
|
| 37 |
+
|
| 38 |
+
input[type="text"] {
|
| 39 |
+
flex: 1;
|
| 40 |
+
padding: 14px 18px;
|
| 41 |
+
font-size: 16px;
|
| 42 |
+
border: 1.5px solid #d0d7e2;
|
| 43 |
+
border-radius: 8px;
|
| 44 |
+
background-color: #f9fbff;
|
| 45 |
+
transition: border-color 0.3s ease, box-shadow 0.3s ease;
|
| 46 |
+
}
|
| 47 |
+
|
| 48 |
+
input[type="text"]:focus {
|
| 49 |
+
border-color: #5c9ded;
|
| 50 |
+
outline: none;
|
| 51 |
+
box-shadow: 0 0 6px rgba(92, 157, 237, 0.4);
|
| 52 |
+
}
|
| 53 |
+
|
| 54 |
+
button {
|
| 55 |
+
padding: 14px 22px;
|
| 56 |
+
background-color: #5c9ded;
|
| 57 |
+
color: white;
|
| 58 |
+
border: none;
|
| 59 |
+
font-size: 16px;
|
| 60 |
+
font-weight: 500;
|
| 61 |
+
border-radius: 8px;
|
| 62 |
+
cursor: pointer;
|
| 63 |
+
transition: background-color 0.3s ease, transform 0.2s ease;
|
| 64 |
+
}
|
| 65 |
+
|
| 66 |
+
button:hover {
|
| 67 |
+
background-color: #3b7bd9;
|
| 68 |
+
transform: scale(1.03);
|
| 69 |
+
}
|
| 70 |
+
|
| 71 |
+
.result {
|
| 72 |
+
background: #eef6ff;
|
| 73 |
+
padding: 25px;
|
| 74 |
+
border-radius: 10px;
|
| 75 |
+
font-size: 17px;
|
| 76 |
+
line-height: 1.7;
|
| 77 |
+
color: #2d3b45;
|
| 78 |
+
border-left: 5px solid #5c9ded;
|
| 79 |
+
}
|
templates/index.html
ADDED
|
@@ -0,0 +1,144 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
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 0;
|
| 10 |
+
font-family: 'Poppins', sans-serif;
|
| 11 |
+
color: #333;
|
| 12 |
+
display: flex;
|
| 13 |
+
justify-content: center;
|
| 14 |
+
align-items: center;
|
| 15 |
+
min-height: 100vh;
|
| 16 |
+
padding: 20px;
|
| 17 |
+
box-sizing: border-box;
|
| 18 |
+
position: relative;
|
| 19 |
+
overflow: hidden;
|
| 20 |
+
|
| 21 |
+
/* New background image */
|
| 22 |
+
background-image: url('/static/images/bg.jpg');
|
| 23 |
+
background-size: cover;
|
| 24 |
+
background-position: center;
|
| 25 |
+
background-attachment: fixed;
|
| 26 |
+
}
|
| 27 |
+
|
| 28 |
+
.container {
|
| 29 |
+
background: linear-gradient(135deg, rgba(88,184,246,0.85), rgba(230,165,227,0.85));
|
| 30 |
+
border: 1px solid rgba(255, 251, 234, 1);
|
| 31 |
+
border-radius: 20px;
|
| 32 |
+
padding: 40px 20px;
|
| 33 |
+
box-shadow: 0 0 25px rgba(255, 251, 239, 0.62);
|
| 34 |
+
text-align: center;
|
| 35 |
+
max-width: 500px;
|
| 36 |
+
width: 100%;
|
| 37 |
+
backdrop-filter: blur(20px) saturate(180%);
|
| 38 |
+
-webkit-backdrop-filter: blur(20px) saturate(180%);
|
| 39 |
+
z-index: 1;
|
| 40 |
+
}
|
| 41 |
+
|
| 42 |
+
.container h1 {
|
| 43 |
+
font-size: clamp(20px, 4vw, 32px);
|
| 44 |
+
margin-bottom: 20px;
|
| 45 |
+
color: #ffffff;
|
| 46 |
+
text-shadow: 0 0 10px rgba(64, 60, 86, 0.29);
|
| 47 |
+
}
|
| 48 |
+
|
| 49 |
+
.input-group {
|
| 50 |
+
display: flex;
|
| 51 |
+
flex-direction: column;
|
| 52 |
+
align-items: stretch;
|
| 53 |
+
gap: 10px;
|
| 54 |
+
}
|
| 55 |
+
|
| 56 |
+
input[type="text"] {
|
| 57 |
+
padding: 12px 15px;
|
| 58 |
+
border: 1px solid rgba(255, 255, 255, 0.6);
|
| 59 |
+
border-radius: 10px;
|
| 60 |
+
font-size: 16px;
|
| 61 |
+
background-color: rgba(255, 255, 255, 0.9);
|
| 62 |
+
color: #333;
|
| 63 |
+
box-shadow: 0 0 12px rgba(64, 60, 86, 0.29);
|
| 64 |
+
outline: none;
|
| 65 |
+
transition: box-shadow 0.3s ease, border-color 0.3s ease;
|
| 66 |
+
width: 100%;
|
| 67 |
+
box-sizing: border-box;
|
| 68 |
+
}
|
| 69 |
+
|
| 70 |
+
input[type="text"]::placeholder {
|
| 71 |
+
color: #777;
|
| 72 |
+
}
|
| 73 |
+
|
| 74 |
+
input[type="text"]:focus {
|
| 75 |
+
box-shadow: 0 0 15px rgba(88,184,246,0.7);
|
| 76 |
+
border-color: rgba(88,184,246,1);
|
| 77 |
+
}
|
| 78 |
+
|
| 79 |
+
button {
|
| 80 |
+
background: linear-gradient(135deg, #d78fd3ff, #49a5e2ff);
|
| 81 |
+
border: 1px solid rgba(255, 251, 234, 1);
|
| 82 |
+
border-radius: 10px;
|
| 83 |
+
padding: 12px 20px;
|
| 84 |
+
color: #fff;
|
| 85 |
+
cursor: pointer;
|
| 86 |
+
font-weight: bold;
|
| 87 |
+
font-size: 16px;
|
| 88 |
+
transition: 0.3s ease;
|
| 89 |
+
width: 100%;
|
| 90 |
+
box-sizing: border-box;
|
| 91 |
+
box-shadow: 0 0 15px rgba(255, 251, 239, 0.5);
|
| 92 |
+
}
|
| 93 |
+
|
| 94 |
+
button:hover {
|
| 95 |
+
background: linear-gradient(135deg, #49a5e2ff, #d78fd3ff);
|
| 96 |
+
transform: scale(1.05);
|
| 97 |
+
box-shadow: 0 0 18px rgba(110, 100, 110, 0.51);
|
| 98 |
+
}
|
| 99 |
+
|
| 100 |
+
#output {
|
| 101 |
+
margin-top: 20px;
|
| 102 |
+
border: 1px solid rgba(255,255,255,0.4);
|
| 103 |
+
background: linear-gradient(135deg, rgba(229, 225, 255, 0.9), rgba(198, 232, 255, 0.9));
|
| 104 |
+
padding: 15px;
|
| 105 |
+
border-radius: 10px;
|
| 106 |
+
color: #2d1818ff;
|
| 107 |
+
box-shadow: 0 0 15px rgba(176,166,245,0.7);
|
| 108 |
+
text-align: justify;
|
| 109 |
+
}
|
| 110 |
+
|
| 111 |
+
@media (min-width: 600px) {
|
| 112 |
+
.input-group {
|
| 113 |
+
flex-direction: row;
|
| 114 |
+
justify-content: center;
|
| 115 |
+
}
|
| 116 |
+
|
| 117 |
+
input[type="text"] {
|
| 118 |
+
width: 70%;
|
| 119 |
+
}
|
| 120 |
+
|
| 121 |
+
button {
|
| 122 |
+
width: auto;
|
| 123 |
+
}
|
| 124 |
+
}
|
| 125 |
+
</style>
|
| 126 |
+
</head>
|
| 127 |
+
<body>
|
| 128 |
+
|
| 129 |
+
<div class="container">
|
| 130 |
+
<h1>AI Blog Generator</h1>
|
| 131 |
+
<form class="input-group" method="POST">
|
| 132 |
+
<input type="text" name="topic" placeholder="Enter your topic">
|
| 133 |
+
<button type="submit">Generate</button>
|
| 134 |
+
</form>
|
| 135 |
+
|
| 136 |
+
{% if paragraph %}
|
| 137 |
+
<div id="output">
|
| 138 |
+
{{ paragraph }}
|
| 139 |
+
</div>
|
| 140 |
+
{% endif %}
|
| 141 |
+
</div>
|
| 142 |
+
|
| 143 |
+
</body>
|
| 144 |
+
</html>
|