Webbsidaa för chatt
This commit is contained in:
@@ -0,0 +1,49 @@
|
||||
<!-->
|
||||
Run a simple HTTP server in the directory containing your HTML file
|
||||
python -m http.server 8000
|
||||
Open your web browser and navigate to http://localhost:8000/client.html
|
||||
-->
|
||||
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<title>Ollama Interaction</title>
|
||||
<style>
|
||||
/* Basic styling */
|
||||
body { font-family: Arial, sans-serif; }
|
||||
#chatbox {
|
||||
width: 80%; /* responsive width */
|
||||
max-width: 400px;
|
||||
height: 300px;
|
||||
border: 1px solid #ccc;
|
||||
overflow-y: scroll;
|
||||
padding: 10px;
|
||||
}
|
||||
.message {
|
||||
margin-bottom: 10px;
|
||||
}
|
||||
.user-message {
|
||||
background-color: #f0f0f0;
|
||||
padding: 10px;
|
||||
border-radius: 10px;
|
||||
}
|
||||
.ai-response {
|
||||
background-color: #ccc;
|
||||
padding: 10px;
|
||||
border-radius: 10px;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<h1>Ollama Interaction</h1>
|
||||
<div id="chatbox">
|
||||
<!-- messages will be rendered here -->
|
||||
</div>
|
||||
<input type="text" id="userInput" placeholder="Type your message here...">
|
||||
<button onclick="sendMessage()">Send</button>
|
||||
|
||||
<!-- Link to the external frontend.js script (relative or absolute path)-->
|
||||
<script src="frontend.js"></script>
|
||||
</body>
|
||||
</html>
|
||||
Reference in New Issue
Block a user