Spaces:
Build error
Build error
Commit ·
aa69369
1
Parent(s): a971e8c
Update app.py
Browse files
app.py
CHANGED
|
@@ -38,12 +38,15 @@ def article_or_concept(input_type, article_data,concept_data):
|
|
| 38 |
|
| 39 |
article_url_input = gr.inputs.Textbox(label="Enter article URL:")
|
| 40 |
concept_input = gr.inputs.Textbox(label="Enter a concept:")
|
|
|
|
|
|
|
|
|
|
| 41 |
|
| 42 |
input_type = gr.inputs.Dropdown(choices=["Article", "Concept"], label="Select input type:")
|
| 43 |
|
| 44 |
output_text = gr.outputs.Textbox(label="Explanation:")
|
| 45 |
|
| 46 |
-
interface = gr.Interface(fn=article_or_concept, inputs=[input_type, article_url_input, concept_input], outputs=output_text, title="Machine Learning Granny",
|
| 47 |
theme = 'huggingface',
|
| 48 |
description="Input either a ML article URL or a concept to receive an explanation that even a grandmother can understand.")
|
| 49 |
|
|
|
|
| 38 |
|
| 39 |
article_url_input = gr.inputs.Textbox(label="Enter article URL:")
|
| 40 |
concept_input = gr.inputs.Textbox(label="Enter a concept:")
|
| 41 |
+
sample_url = [['https://www.technologyreview.com/2021/07/22/1029973/deepmind-alphafold-protein-folding-biology-disease-drugs-proteome/'],
|
| 42 |
+
['https://www.technologyreview.com/2021/07/21/1029860/disability-rights-employment-discrimination-ai-hiring/'],
|
| 43 |
+
['https://www.technologyreview.com/2021/07/09/1028140/ai-voice-actors-sound-human/']]
|
| 44 |
|
| 45 |
input_type = gr.inputs.Dropdown(choices=["Article", "Concept"], label="Select input type:")
|
| 46 |
|
| 47 |
output_text = gr.outputs.Textbox(label="Explanation:")
|
| 48 |
|
| 49 |
+
interface = gr.Interface(fn=article_or_concept, inputs=[input_type, article_url_input, concept_input], outputs=output_text, examples=sample_url, title="Machine Learning Granny",
|
| 50 |
theme = 'huggingface',
|
| 51 |
description="Input either a ML article URL or a concept to receive an explanation that even a grandmother can understand.")
|
| 52 |
|