Spaces:
Runtime error
Runtime error
Commit
·
89cc465
1
Parent(s):
5b7d34c
Second revision
Browse files
app.py
CHANGED
@@ -15,7 +15,7 @@ We'll tokenize this using the appropriate tokenizer, and we'll mask the sixth to
|
|
15 |
|
16 |
<br/><br/>
|
17 |
|
18 |
-
When using the <code>distilbert-base-cased</code> checkpoint to unmask that token, what is the most probable predicted token (please provide the decoded token, and not the ID)?
|
19 |
|
20 |
<br/>
|
21 |
<br/>
|
@@ -24,6 +24,8 @@ Tips:
|
|
24 |
- You might find the <a href="https://huggingface.co/docs/transformers/index" target="_blank">transformers docs (link)</a> useful.
|
25 |
<br/>
|
26 |
- You might find the <a href="https://huggingface.co/docs/datasets/index" target="_blank">datasets docs (link)</a> useful.
|
|
|
|
|
27 |
"""
|
28 |
|
29 |
internships = {
|
@@ -61,6 +63,7 @@ with gr.Blocks() as demo:
|
|
61 |
summary = gr.HTML(label='Question')
|
62 |
details = gr.Textbox(label="Answer")
|
63 |
username = gr.Textbox(label="Hugging Face Username")
|
|
|
64 |
generate_btn = gr.Button("Submit")
|
65 |
output = gr.Label()
|
66 |
|
@@ -71,8 +74,8 @@ with gr.Blocks() as demo:
|
|
71 |
|
72 |
internship_choice.change(filter_species, internship_choice, [summary, details_col])
|
73 |
|
74 |
-
def on_click(_details, _username, _internship_choice):
|
75 |
-
response = {'response': _details, "internship": _internship_choice}
|
76 |
upload_file(
|
77 |
path_or_fileobj=BytesIO(bytes(json.dumps(response), 'utf-8')),
|
78 |
path_in_repo=_username,
|
@@ -82,7 +85,7 @@ with gr.Blocks() as demo:
|
|
82 |
)
|
83 |
return f"Submitted: '{_details}' for user '{_username}'"
|
84 |
|
85 |
-
generate_btn.click(on_click, inputs=[details, username, internship_choice], outputs=[output])
|
86 |
|
87 |
|
88 |
if __name__ == "__main__":
|
|
|
15 |
|
16 |
<br/><br/>
|
17 |
|
18 |
+
When using the <code>distilbert-base-cased</code> checkpoint to unmask that (sixth token, index 5) token, what is the most probable predicted token (please provide the decoded token, and not the ID)?
|
19 |
|
20 |
<br/>
|
21 |
<br/>
|
|
|
24 |
- You might find the <a href="https://huggingface.co/docs/transformers/index" target="_blank">transformers docs (link)</a> useful.
|
25 |
<br/>
|
26 |
- You might find the <a href="https://huggingface.co/docs/datasets/index" target="_blank">datasets docs (link)</a> useful.
|
27 |
+
<br/>
|
28 |
+
- You might also be interested in the <a href="https://huggingface.co/course" target="_blank">Hugging Face course (link)</a>.
|
29 |
"""
|
30 |
|
31 |
internships = {
|
|
|
63 |
summary = gr.HTML(label='Question')
|
64 |
details = gr.Textbox(label="Answer")
|
65 |
username = gr.Textbox(label="Hugging Face Username")
|
66 |
+
comment = gr.Textbox(label="Any comment?")
|
67 |
generate_btn = gr.Button("Submit")
|
68 |
output = gr.Label()
|
69 |
|
|
|
74 |
|
75 |
internship_choice.change(filter_species, internship_choice, [summary, details_col])
|
76 |
|
77 |
+
def on_click(_details, _username, _internship_choice, _comment):
|
78 |
+
response = {'response': _details, "internship": _internship_choice, "comment": _comment}
|
79 |
upload_file(
|
80 |
path_or_fileobj=BytesIO(bytes(json.dumps(response), 'utf-8')),
|
81 |
path_in_repo=_username,
|
|
|
85 |
)
|
86 |
return f"Submitted: '{_details}' for user '{_username}'"
|
87 |
|
88 |
+
generate_btn.click(on_click, inputs=[details, username, internship_choice, comment], outputs=[output])
|
89 |
|
90 |
|
91 |
if __name__ == "__main__":
|