Add admin features, user profile management, and generation capabilities
- Implemented admin dashboard with user management features including role assignment and deletion. - Added user profile page for updating email and password. - Created separate routes and templates for text, image, and video generation with appropriate forms. - Enhanced navigation with dropdown for generation options and loading overlay for better user experience. - Introduced comprehensive error handling and user feedback through alerts. - Updated styles for improved UI consistency and responsiveness. Co-authored-by: Copilot <copilot@github.com>
This commit is contained in:
@@ -0,0 +1,35 @@
|
||||
{% extends "base.html" %}
|
||||
{% block title %}Text Generation — AI Allucanget{% endblock %}
|
||||
{% block content %}
|
||||
<div class="card">
|
||||
<h1>Text Generation</h1>
|
||||
<form method="post">
|
||||
<label for="model">Model</label>
|
||||
<input id="model" name="model" type="text" required
|
||||
placeholder="e.g. openai/gpt-4o"
|
||||
value="{{ request.form.get('model', '') }}">
|
||||
|
||||
<label for="prompt">Prompt</label>
|
||||
<textarea id="prompt" name="prompt" rows="5" required
|
||||
placeholder="Describe what you want…">{{ request.form.get('prompt', '') }}</textarea>
|
||||
|
||||
<button type="submit">Generate text</button>
|
||||
</form>
|
||||
|
||||
{% if error %}
|
||||
<div class="alert alert-error mt-2">{{ error }}</div>
|
||||
{% endif %}
|
||||
|
||||
{% if result %}
|
||||
<div class="result">
|
||||
<h2>Result</h2>
|
||||
<pre>{{ result.content }}</pre>
|
||||
{% if result.usage %}
|
||||
<p class="text-muted mt-1" style="font-size:0.8rem;">
|
||||
Tokens: {{ result.usage.get('total_tokens', '—') }}
|
||||
</p>
|
||||
{% endif %}
|
||||
</div>
|
||||
{% endif %}
|
||||
</div>
|
||||
{% endblock %}
|
||||
Reference in New Issue
Block a user