Spaces:
Runtime error
Runtime error
Francisco Santos
commited on
Commit
•
620d324
1
Parent(s):
4b6d7e1
examples
Browse files- app.py +5 -1
- examples/form0.html +41 -0
- examples/form0_answer.json +57 -0
- examples/form1.html +31 -0
- examples/form1_answer1.json +8 -0
- examples/form2.html +33 -0
- examples/form2_answer.json +7 -0
- examples/form3.html +27 -0
- examples/form3_answer.json +4 -0
- examples/form4.html +17 -0
- examples/form4_answer.json +4 -0
app.py
CHANGED
@@ -160,6 +160,10 @@ def process_files(html_file, json_file):
|
|
160 |
|
161 |
iface = gr.Interface(fn=process_files,
|
162 |
inputs=[gr.inputs.File(label="Upload HTML File"), gr.inputs.File(label="Upload JSON File")],
|
163 |
-
outputs="text"
|
|
|
|
|
|
|
|
|
164 |
|
165 |
iface.launch()
|
|
|
160 |
|
161 |
iface = gr.Interface(fn=process_files,
|
162 |
inputs=[gr.inputs.File(label="Upload HTML File"), gr.inputs.File(label="Upload JSON File")],
|
163 |
+
outputs="text",
|
164 |
+
examples=[
|
165 |
+
["./examples/form0.html", "./examples/form1.html", "./examples/form2.html", "./examples/form3.html", "./examples/form4.html"],
|
166 |
+
["./examples/form0_answer.json", "./examples/form1_answer.json", "./examples/form2_answer.json", "./examples/form3_answer.json", "./examples/form4_answer.json"]
|
167 |
+
])
|
168 |
|
169 |
iface.launch()
|
examples/form0.html
ADDED
@@ -0,0 +1,41 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<!DOCTYPE html>
|
2 |
+
<html>
|
3 |
+
<head>
|
4 |
+
<title>Resume Form</title>
|
5 |
+
</head>
|
6 |
+
<body>
|
7 |
+
<h1>Resume Form</h1>
|
8 |
+
|
9 |
+
<h2>Longer Version</h2>
|
10 |
+
<form action="/" method="POST">
|
11 |
+
<label>Education</label><br>
|
12 |
+
<input type="text" name="education[0][degree]" placeholder="Degree" required><br>
|
13 |
+
<input type="text" name="education[0][institution]" placeholder="Institution" required><br>
|
14 |
+
<input type="text" name="education[0][dates]" placeholder="Dates" required><br>
|
15 |
+
<input type="text" name="education[0][thesisTitle]" placeholder="Thesis Title"><br>
|
16 |
+
<input type="text" name="education[0][thesisDescription]" placeholder="Thesis Description"><br><br>
|
17 |
+
|
18 |
+
<label>Work Experience</label><br>
|
19 |
+
<input type="text" name="workExperience[0][title]" placeholder="Title" required><br>
|
20 |
+
<input type="text" name="workExperience[0][employer]" placeholder="Employer" required><br>
|
21 |
+
<input type="text" name="workExperience[0][dates]" placeholder="Dates" required><br>
|
22 |
+
<textarea name="workExperience[0][accomplishments]" placeholder="Accomplishments"></textarea><br>
|
23 |
+
<input type="text" name="workExperience[1][title]" placeholder="Title" required><br>
|
24 |
+
<input type="text" name="workExperience[1][employer]" placeholder="Employer" required><br>
|
25 |
+
<input type="text" name="workExperience[1][dates]" placeholder="Dates" required><br>
|
26 |
+
<textarea name="workExperience[1][projects]" placeholder="Projects"></textarea><br>
|
27 |
+
<input type="text" name="workExperience[1][training]" placeholder="Training"><br><br>
|
28 |
+
|
29 |
+
<label>Extracurricular Activities</label><br>
|
30 |
+
<input type="text" name="extracurricularActivities[0][project]" placeholder="Project" required><br>
|
31 |
+
<input type="text" name="extracurricularActivities[0][event]" placeholder="Event" required><br>
|
32 |
+
<input type="text" name="extracurricularActivities[0][dates]" placeholder="Dates" required><br>
|
33 |
+
<textarea name="extracurricularActivities[0][description]" placeholder="Description"></textarea><br>
|
34 |
+
<input type="text" name="extracurricularActivities[1][title]" placeholder="Title" required><br>
|
35 |
+
<input type="text" name="extracurricularActivities[1][employer]" placeholder="Employer" required><br>
|
36 |
+
<input type="text" name="extracurricularActivities[1][dates]" placeholder="Dates" required><br>
|
37 |
+
<textarea name="extracurricularActivities[1][accomplishments]" placeholder="Accomplishments"></textarea><br><br>
|
38 |
+
|
39 |
+
<input type="submit" value="Submit">
|
40 |
+
</form>
|
41 |
+
</body>
|
examples/form0_answer.json
ADDED
@@ -0,0 +1,57 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"education": [
|
3 |
+
{
|
4 |
+
"degree": "Masters in Electrical and Computer Engineering",
|
5 |
+
"institution": "Instituto Superior Técnico",
|
6 |
+
"dates": "Sep 2016 - Dec 2022",
|
7 |
+
"thesisTitle": "Sounds2Rythms - Making Rhythmic patterns from Found Sounds",
|
8 |
+
"thesisDescription": "Use of Variational Autoencoders and Transformers to compose consistent rhythmic based music from recordings."
|
9 |
+
},
|
10 |
+
{
|
11 |
+
"degree": "Basic Music Course - 5th grade",
|
12 |
+
"institution": "AMAlcobaça"
|
13 |
+
}
|
14 |
+
],
|
15 |
+
"workExperience": [
|
16 |
+
{
|
17 |
+
"title": "Professional athlete & Olympic Swimmer",
|
18 |
+
"employer": "Sporting Clube de Portugal",
|
19 |
+
"dates": "Sep 2008 - Jun 2013",
|
20 |
+
"accomplishments": [
|
21 |
+
"Current holder of 7 national records.",
|
22 |
+
"More than 50 medals in national championships.",
|
23 |
+
"15 internationalisations with special emphasis on 2022 Rome European Aquatics Championships and 2020 Tokyo Summer Olympics."
|
24 |
+
]
|
25 |
+
},
|
26 |
+
{
|
27 |
+
"title": "Software Engineer",
|
28 |
+
"employer": "Altice Portugal",
|
29 |
+
"dates": "Jul 2020 - Aug 2020",
|
30 |
+
"projects": [
|
31 |
+
"Integration of the Project Management department on Nexus (log centralization and operational intelligence platform). Use of technologies such as: Elastic, Kibana, Logstash, Beats and Kafka.",
|
32 |
+
"Development of a chatbot to help new Nexus users with DialogFlow and Flask."
|
33 |
+
],
|
34 |
+
"training": [
|
35 |
+
"Certified Design Thinking Training."
|
36 |
+
]
|
37 |
+
}
|
38 |
+
],
|
39 |
+
"extracurricularActivities": [
|
40 |
+
{
|
41 |
+
"project": "Need4Gym - Winner Project",
|
42 |
+
"event": "Neecathon - 2nd edition",
|
43 |
+
"dates": "Oct 2019",
|
44 |
+
"description": "Development of hardware and software that uses physical activity input for video games and applications. Use of technologies such as: Bitalino, Python, PyGame and OpenSignals."
|
45 |
+
},
|
46 |
+
{
|
47 |
+
"title": "Robotics Club Member",
|
48 |
+
"employer": "ECBendita",
|
49 |
+
"dates": "Dec 2013 - Jun 2016",
|
50 |
+
"accomplishments": [
|
51 |
+
"ESTG Leiria Workshop with toys adaptation for children with special needs.",
|
52 |
+
"2014 RoboParty Competition.",
|
53 |
+
"23rd Jovens Cientistas e Investigadores Competition - 9th National Science Exhibition."
|
54 |
+
]
|
55 |
+
}
|
56 |
+
]
|
57 |
+
}
|
examples/form1.html
ADDED
@@ -0,0 +1,31 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<!DOCTYPE html>
|
2 |
+
<html>
|
3 |
+
<head>
|
4 |
+
<meta charset="UTF-8">
|
5 |
+
<title>Contact Form</title>
|
6 |
+
</head>
|
7 |
+
<body>
|
8 |
+
<h1>Contact Form</h1>
|
9 |
+
<form action="/submit-form" method="POST">
|
10 |
+
<label for="name">Name:</label>
|
11 |
+
<input type="text" id="name" name="name" required>
|
12 |
+
<br>
|
13 |
+
<label for="email">Email:</label>
|
14 |
+
<input type="email" id="email" name="email" required>
|
15 |
+
<br>
|
16 |
+
<label for="location">Location:</label>
|
17 |
+
<input type="text" id="location" name="location" required>
|
18 |
+
<br>
|
19 |
+
<label for="github">GitHub:</label>
|
20 |
+
<input type="url" id="github" name="github" required>
|
21 |
+
<br>
|
22 |
+
<label for="linkedin">LinkedIn:</label>
|
23 |
+
<input type="url" id="linkedin" name="linkedin" required>
|
24 |
+
<br>
|
25 |
+
<label for="phone">Phone:</label>
|
26 |
+
<input type="tel" id="phone" name="phone" required>
|
27 |
+
<br><br>
|
28 |
+
<input type="submit" value="Submit">
|
29 |
+
</form>
|
30 |
+
</body>
|
31 |
+
</html>
|
examples/form1_answer1.json
ADDED
@@ -0,0 +1,8 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"name": "",
|
3 |
+
"email": "frs98com@gmail.com",
|
4 |
+
"location": "Amsterdam, Netherlands",
|
5 |
+
"github": "https://github.com/qtoino",
|
6 |
+
"linkedin": "https://www.linkedin.com/in/francisco-rsantos/",
|
7 |
+
"phone": "+351 927 050 265"
|
8 |
+
}
|
examples/form2.html
ADDED
@@ -0,0 +1,33 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<!DOCTYPE html>
|
2 |
+
<html>
|
3 |
+
<head>
|
4 |
+
<title>Resume Form</title>
|
5 |
+
</head>
|
6 |
+
<body>
|
7 |
+
<form action="/" method="POST">
|
8 |
+
<label>What kind of pet do you have?</label>
|
9 |
+
<br>
|
10 |
+
<input type="radio" id="dog" name="pet" value="dog">
|
11 |
+
<label for="dog">Dog</label>
|
12 |
+
<br>
|
13 |
+
<input type="radio" id="cat" name="pet" value="cat">
|
14 |
+
<label for="cat">Cat</label>
|
15 |
+
<br>
|
16 |
+
<input type="radio" id="other" name="pet" value="other">
|
17 |
+
<label for="other">Other</label>
|
18 |
+
<br><br>
|
19 |
+
<label>What color is your pet?</label>
|
20 |
+
<br>
|
21 |
+
<input type="checkbox" id="black" name="color" value="black">
|
22 |
+
<label for="black">Black</label>
|
23 |
+
<br>
|
24 |
+
<input type="checkbox" id="white" name="color" value="white">
|
25 |
+
<label for="white">White</label>
|
26 |
+
<br>
|
27 |
+
<input type="checkbox" id="brown" name="color" value="brown">
|
28 |
+
<label for="brown">Brown</label>
|
29 |
+
<br><br>
|
30 |
+
<input type="submit" value="Submit">
|
31 |
+
</form>
|
32 |
+
</body>
|
33 |
+
</html>
|
examples/form2_answer.json
ADDED
@@ -0,0 +1,7 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"pet": "dog",
|
3 |
+
"color": [
|
4 |
+
"black",
|
5 |
+
"brown"
|
6 |
+
]
|
7 |
+
}
|
examples/form3.html
ADDED
@@ -0,0 +1,27 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<!DOCTYPE html>
|
2 |
+
<html>
|
3 |
+
<head>
|
4 |
+
<title>Create account Form</title>
|
5 |
+
</head>
|
6 |
+
<body>
|
7 |
+
<form action="/" method="POST">
|
8 |
+
<label for="name">Name:</label>
|
9 |
+
<input type="text" id="name" name="name" required>
|
10 |
+
<br>
|
11 |
+
<label for="country">Select your country:</label>
|
12 |
+
<br>
|
13 |
+
<select id="country" name="country">
|
14 |
+
<option value="usa">USA</option>
|
15 |
+
<option value="uk">UK</option>
|
16 |
+
<option value="germany">Germany</option>
|
17 |
+
<option value="japan">Japan</option>
|
18 |
+
</select>
|
19 |
+
<br><br>
|
20 |
+
<label for="birthday">Select your birthday:</label>
|
21 |
+
<br>
|
22 |
+
<input type="date" id="birthday" name="birthday">
|
23 |
+
<br><br>
|
24 |
+
<input type="submit" value="Submit">
|
25 |
+
</form>
|
26 |
+
</body>
|
27 |
+
</html>
|
examples/form3_answer.json
ADDED
@@ -0,0 +1,4 @@
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"country": "germany",
|
3 |
+
"birthday": "1990-05-07"
|
4 |
+
}
|
examples/form4.html
ADDED
@@ -0,0 +1,17 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
|
2 |
+
<!DOCTYPE html>
|
3 |
+
<html>
|
4 |
+
<head>
|
5 |
+
<title>Email Form</title>
|
6 |
+
</head>
|
7 |
+
<body>
|
8 |
+
<form action="/" method="POST">
|
9 |
+
<label for="name">Name:</label>
|
10 |
+
<input type="text" id="name" name="name" required>
|
11 |
+
<br>
|
12 |
+
<label for="email">Email:</label>
|
13 |
+
<input type="email" id="email" name="email" required>
|
14 |
+
<br>
|
15 |
+
<input type="submit" value="Submit">
|
16 |
+
</form>
|
17 |
+
</html>
|
examples/form4_answer.json
ADDED
@@ -0,0 +1,4 @@
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"name": "John Doe",
|
3 |
+
"email": "johndoe@example.com"
|
4 |
+
}
|