-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
146 lines (119 loc) · 5.68 KB
/
index.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Monster Challenge Rating Predictor</title>
<style>
body {
font-family: Arial, sans-serif;
margin: 20px;
padding: 20px;
max-width: 800px;
}
form {
background-color: #f9f9f9;
padding: 15px;
border-radius: 5px;
border: 1px solid #ddd;
}
label {
font-weight: bold;
display: block;
margin-top: 10px;
}
input, textarea {
margin-bottom: 10px;
padding: 5px;
width: 100%;
}
button {
background-color: #007BFF;
color: white;
padding: 10px 20px;
border: none;
border-radius: 3px;
cursor: pointer;
}
button:hover {
background-color: #0056b3;
}
.error {
color: red;
font-weight: bold;
}
.result {
color: green;
font-weight: bold;
}
</style>
</head>
<body>
<h1>Monster Challenge Rating Predictor</h1>
<form action="https://project-4-dnd-challenge-ratings.onrender.com/predict" method="post">
<h2>General Information</h2>
<label for="name">Name:</label>
<input type="text" id="name" name="name" placeholder="Enter monster name" required>
<label for="size">Size:</label>
<input type="text" id="size" name="size" placeholder="e.g., Medium" required>
<label for="type">Type:</label>
<input type="text" id="type" name="type" placeholder="e.g., Dragon" required>
<label for="alignment">Alignment:</label>
<input type="text" id="alignment" name="alignment" placeholder="e.g., Chaotic Evil" required>
<h2>Core Stats</h2>
<label for="armor_class">Armor Class:</label>
<input type="number" id="armor_class" name="armor_class" placeholder="e.g., 15" required>
<label for="hit_points">Hit Points:</label>
<input type="number" id="hit_points" name="hit_points" placeholder="e.g., 120" required>
<label for="hit_dice">Hit Dice:</label>
<input type="text" id="hit_dice" name="hit_dice" placeholder="e.g., 10d10+30" required>
<label for="speed">Speed:</label>
<input type="text" id="speed" name="speed" placeholder="e.g., 30 ft., fly 60 ft." required>
<h2>Abilities</h2>
<label for="strength">Strength:</label>
<input type="number" id="strength" name="strength" placeholder="e.g., 18" required>
<label for="dexterity">Dexterity:</label>
<input type="number" id="dexterity" name="dexterity" placeholder="e.g., 14" required>
<label for="constitution">Constitution:</label>
<input type="number" id="constitution" name="constitution" placeholder="e.g., 16" required>
<label for="intelligence">Intelligence:</label>
<input type="number" id="intelligence" name="intelligence" placeholder="e.g., 10" required>
<label for="wisdom">Wisdom:</label>
<input type="number" id="wisdom" name="wisdom" placeholder="e.g., 12" required>
<label for="charisma">Charisma:</label>
<input type="number" id="charisma" name="charisma" placeholder="e.g., 16" required>
<h2>Special Attributes</h2>
<label for="proficiencies">Proficiencies:</label>
<textarea id="proficiencies" name="proficiencies" placeholder="e.g., Perception +5"></textarea>
<label for="damage_vulnerabilities">Damage Vulnerabilities:</label>
<textarea id="damage_vulnerabilities" name="damage_vulnerabilities" placeholder="e.g., Fire"></textarea>
<label for="damage_resistances">Damage Resistances:</label>
<textarea id="damage_resistances" name="damage_resistances" placeholder="e.g., Cold"></textarea>
<label for="damage_immunities">Damage Immunities:</label>
<textarea id="damage_immunities" name="damage_immunities" placeholder="e.g., Poison"></textarea>
<label for="condition_immunities">Condition Immunities:</label>
<textarea id="condition_immunities" name="condition_immunities" placeholder="e.g., Stunned"></textarea>
<label for="senses">Senses:</label>
<textarea id="senses" name="senses" placeholder="e.g., Darkvision 120 ft."></textarea>
<label for="special_abilities">Special Abilities:</label>
<textarea id="special_abilities" name="special_abilities" placeholder="e.g., Breath Weapon"></textarea>
<label for="actions">Actions:</label>
<textarea id="actions" name="actions" placeholder="e.g., Multiattack"></textarea>
<label for="legendary_actions">Legendary Actions:</label>
<textarea id="legendary_actions" name="legendary_actions" placeholder="e.g., Tail Swipe"></textarea>
<label for="reactions">Reactions:</label>
<textarea id="reactions" name="reactions" placeholder="e.g., Parry"></textarea>
<label for="other_speeds">Other Speeds:</label>
<textarea id="other_speeds" name="other_speeds" placeholder="e.g., Swim 30 ft."></textarea>
<button type="submit">Predict Challenge Rating</button>
</form>
<!-- Display Prediction -->
{% if prediction %}
<h2 class="result">Predicted Challenge Rating: {{ prediction }}</h2>
{% endif %}
<!-- Display Errors -->
{% if error %}
<h2 class="error">{{ error }}</h2>
{% endif %}
</body>
</html>