Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
T
tp_final_machine_learning
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
valentin.acevedoa
tp_final_machine_learning
Commits
4e831dc5
Commit
4e831dc5
authored
2 years ago
by
andre.gouveiad
Browse files
Options
Downloads
Patches
Plain Diff
page web finit avec les appels au script python mais pas tester encore
parent
29b16e23
No related branches found
No related tags found
No related merge requests found
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
front/css/style.css
+23
-0
23 additions, 0 deletions
front/css/style.css
front/index.html
+29
-14
29 additions, 14 deletions
front/index.html
project/js/sendData.js
+21
-0
21 additions, 0 deletions
project/js/sendData.js
with
73 additions
and
14 deletions
front/css/style.css
0 → 100644
+
23
−
0
View file @
4e831dc5
h1
{
margin-top
:
5%
;
}
.mainStart
{
display
:
flex
;
}
.flexChild
{
flex
:
1
;
margin-top
:
5%
;
}
.resTitle
{
text-align
:
center
;
border
:
1px
solid
black
;
height
:
10%
;
}
body
{
text-align
:
center
;
}
\ No newline at end of file
This diff is collapsed.
Click to expand it.
front/index.html
+
29
−
14
View file @
4e831dc5
...
...
@@ -2,14 +2,22 @@
<html>
<head>
<title>
Création Titre de Film
</title>
<link
rel=
"stylesheet"
href=
"css/style.css"
>
<script
src=
"js/script.js"
></script>
</head>
<body>
<h1>
Création de Titre de Film
</h1>
<p></p>
<div
class=
"mainStart"
>
<div
class=
"flexChild input"
>
<h2>
Valeur d'entrée
</h2>
<p>
Genre:
</p>
<select
name=
"type"
id=
"type-film"
>
<option
value=
"action"
>
Action
</option>
<option
value=
"animation"
>
Animation
</option>
<option
value=
"aventure"
>
Aventure
</option>
<option
value=
"comedie"
>
Comédie
</option>
<option
value=
"crime"
>
Crime
</option>
<option
value=
"drame"
>
Drame
</option>
<option
value=
"fantastique"
>
Fantastique
</option>
<option
value=
"horreur"
>
Horreur
</option>
...
...
@@ -17,7 +25,14 @@
<option
value=
"science-fiction"
>
Science-Fiction
</option>
<option
value=
"thriller"
>
Thriller
</option>
</select>
<p>
Choisir un film
</p>
<input
type=
"text"
name=
"film"
list=
"films"
>
<p>
Description du film
</p>
<textarea
rows=
"10"
cols=
"50"
id=
"description"
></textarea><br>
<button
id=
"generate"
onclick=
"getTitle()"
>
Générer
</button>
</div>
<div
class=
"flexChild output"
>
<h2>
Résultat de titre généré
</h2>
<textarea
rows=
"15"
cols=
"50"
id=
"resTitle"
></textarea>
</div>
</div>
</body>
</html>
\ No newline at end of file
This diff is collapsed.
Click to expand it.
project/js/sendData.js
0 → 100644
+
21
−
0
View file @
4e831dc5
function
sendRequest
(){
var
message
=
"
List of
"
+
getElementById
(
'
type-film
'
)
+
"
movie titles using keywords:
"
+
getElementById
(
'
description
'
);
return
message
;
}
async
function
getTitle
()
{
var
e
=
document
.
getElementById
(
"
select-number
"
);
var
request
=
{
method
:
'
POST
'
,
body
:
JSON
.
stringify
(
sendRequest
()),
mode
:
'
cors
'
};
let
res
=
await
fetch
(
'
http://127.0.0.1:8000/data
'
,
request
)
.
then
(
response
=>
response
.
json
());
getElementById
(
'
resTitle
'
).
innerHTML
=
res
;
}
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment