Spaces:
Sleeping
Sleeping
| <html lang="en"> | |
| <head> | |
| <meta charset="UTF-8"> | |
| <meta name="viewport" content="width=device-width, initial-scale=1.0"> | |
| <title>Home - NLP Model Trainer</title> | |
| <style> | |
| body { | |
| font-family: Arial, sans-serif; | |
| background-color: #f4f7fa; | |
| color: #333; | |
| margin: 0; | |
| padding: 0; | |
| display: flex; | |
| justify-content: center; | |
| align-items: center; | |
| min-height: 100vh; | |
| } | |
| .container { | |
| width: 90%; | |
| max-width: 800px; | |
| background-color: #ffffff; | |
| padding: 30px; | |
| border-radius: 10px; | |
| box-shadow: 0px 5px 15px rgba(0, 0, 0, 0.2); | |
| text-align: center; | |
| } | |
| h1, h2 { | |
| color: #4a90e2; | |
| margin-bottom: 20px; | |
| } | |
| ul { | |
| list-style-type: none; | |
| padding: 0; | |
| } | |
| li { | |
| display: flex; | |
| justify-content: space-between; | |
| align-items: center; | |
| padding: 10px 0; | |
| border-bottom: 1px solid #e0e0e0; | |
| } | |
| li:last-child { | |
| border-bottom: none; | |
| } | |
| a { | |
| color: #4a90e2; | |
| text-decoration: none; | |
| font-weight: bold; | |
| } | |
| a:hover { | |
| text-decoration: underline; | |
| } | |
| form { | |
| margin-top: 30px; | |
| display: flex; | |
| flex-direction: column; | |
| align-items: center; | |
| } | |
| label { | |
| margin: 10px 0 5px; | |
| font-size: 14px; | |
| color: #555; | |
| } | |
| input[type="text"], | |
| input[type="file"] { | |
| width: 100%; | |
| max-width: 400px; | |
| padding: 8px; | |
| margin-bottom: 15px; | |
| border: 1px solid #ccc; | |
| border-radius: 5px; | |
| font-size: 14px; | |
| } | |
| button[type="submit"] { | |
| padding: 10px 20px; | |
| font-size: 16px; | |
| color: white; | |
| background-color: #4a90e2; | |
| border: none; | |
| border-radius: 5px; | |
| cursor: pointer; | |
| transition: background-color 0.3s; | |
| } | |
| button[type="submit"]:hover { | |
| background-color: #357ab8; | |
| } | |
| .redirect-btn { | |
| margin-top: 20px; | |
| font-size: 16px; | |
| color: #4a90e2; | |
| background: none; | |
| border: none; | |
| cursor: pointer; | |
| } | |
| </style> | |
| </head> | |
| <body> | |
| <div class="container"> | |
| <h1>Available Models</h1> | |
| <ul> | |
| {% for model in models %} | |
| <li> | |
| <a href="{{ url_for('chat', model_name=model) }}">{{ model }}</a> | |
| <a href="{{ url_for('download_model', model_name=model) }}">Download</a> | |
| </li> | |
| {% endfor %} | |
| </ul> | |
| <h2>Upload New Model</h2> | |
| <form action="{{ url_for('upload_file') }}" method="post" enctype="multipart/form-data"> | |
| <label>Model Name:</label> | |
| <input type="text" name="model_name" required> | |
| <label>Q&A CSV File:</label> | |
| <input type="file" name="file" accept=".csv" required> | |
| <button type="submit">Train Model</button> | |
| </form> | |
| </div> | |
| </body> | |
| </html> | |