Spaces:
Runtime error
Runtime error
Joan Giner
commited on
Commit
·
460caa6
1
Parent(s):
5dddb18
Corrected typos
Browse files
app.py
CHANGED
|
@@ -52,9 +52,9 @@ async def extraction(input_file, apikey, dimension):
|
|
| 52 |
|
| 53 |
async def ui_extraction(input_file, apikey, dimension):
|
| 54 |
if (input_file == None):
|
| 55 |
-
raise gr.Error("Please upload a
|
| 56 |
if (input_file.name.split(".")[-1] != "pdf"):
|
| 57 |
-
raise gr.Error("This is not a data paper
|
| 58 |
file_name = input_file.name.split("/")[-1]
|
| 59 |
results, completeness_report = await extractor.extraction(file_name, input_file.name, apikey, dimension)
|
| 60 |
# Build results in the correct format for the Gradio front-end
|
|
@@ -158,7 +158,7 @@ with gr.Blocks(theme=gr.themes.Soft(), css=css) as demo:
|
|
| 158 |
|
| 159 |
""")
|
| 160 |
with gr.Column():
|
| 161 |
-
apikey_elem = gr.Text(label="OpenAI API key")
|
| 162 |
# gr.Markdown("""
|
| 163 |
# <h3> Improving your data and assesing your dataset documentation </h3>
|
| 164 |
# The generated warning also allows you quicly check the completeness of the documentation, and spotting gaps in the document
|
|
|
|
| 52 |
|
| 53 |
async def ui_extraction(input_file, apikey, dimension):
|
| 54 |
if (input_file == None):
|
| 55 |
+
raise gr.Error("Please upload a data paper")
|
| 56 |
if (input_file.name.split(".")[-1] != "pdf"):
|
| 57 |
+
raise gr.Error("This is not a data paper!, please upload it in .pdf format")
|
| 58 |
file_name = input_file.name.split("/")[-1]
|
| 59 |
results, completeness_report = await extractor.extraction(file_name, input_file.name, apikey, dimension)
|
| 60 |
# Build results in the correct format for the Gradio front-end
|
|
|
|
| 158 |
|
| 159 |
""")
|
| 160 |
with gr.Column():
|
| 161 |
+
apikey_elem = gr.Text(label="OpenAI API key", type="password")
|
| 162 |
# gr.Markdown("""
|
| 163 |
# <h3> Improving your data and assesing your dataset documentation </h3>
|
| 164 |
# The generated warning also allows you quicly check the completeness of the documentation, and spotting gaps in the document
|