Fixed html.

This commit is contained in:
Patrick_Pluto 2024-09-16 13:38:30 +02:00
parent 4cbb44b9fc
commit e3cdde8a74
3 changed files with 8 additions and 6 deletions

View file

@ -2,6 +2,7 @@ import requests
import json
from transformers import AutoTokenizer, LlamaForCausalLM
class API:
@staticmethod
def process_text_transformers(prompt, model):
@ -46,4 +47,4 @@ class API:
answer = self.process_text_transformers(message, "meta-llama/Meta-Llama-3.1-8B")
else:
return "Invalid choice"
return answer
return answer

View file

@ -4,7 +4,7 @@
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="stylesheet" href="styles.css">
<link rel="stylesheet" href="/static/styles.css">
<title>AI Assistant</title>
</head>
@ -81,10 +81,10 @@
<!-- Input section: Where user input is provided -->
<div class="input">
<input type="text" placeholder="Type your message here..." />
<button><img src="img/microphone.svg" alt="microphone"></button>
<button><img src="/static/img/microphone.svg" alt="microphone"></button>
<button>Send</button>
</div>
</div>
</body>
</html>
</html>

View file

@ -1,4 +1,4 @@
from flask import Flask
from flask import Flask, send_from_directory
app = Flask(__name__)
@ -7,5 +7,6 @@ app = Flask(__name__)
def index():
return app.send_static_file('index.html')
if __name__ == '__main__':
app.run()
app.run(debug=True)