Spaces:
				
			
			
	
			
			
					
		Running
		
	
	
	
			
			
	
	
	
	
		
		
					
		Running
		
	fixing the drop down options
Browse files
    	
        README.md
    CHANGED
    
    | @@ -9,4 +9,4 @@ app_file: app.py | |
| 9 | 
             
            pinned: false
         | 
| 10 | 
             
            ---
         | 
| 11 |  | 
| 12 | 
            -
             | 
|  | |
| 9 | 
             
            pinned: false
         | 
| 10 | 
             
            ---
         | 
| 11 |  | 
| 12 | 
            +
            This space is for collecting submissions from the science community from BlueSky, X, and LinkedIn. The submissions are generally to bring our attention to work on the Hub that is cool but not getting enough traction (or recently published works in AI4Science). The submission space writes to a private dataset called huggingface/submitted-science-artifacts. 
         | 
    	
        app.py
    CHANGED
    
    | @@ -27,7 +27,7 @@ def append_to_dataset(entry): | |
| 27 |  | 
| 28 | 
             
            def submit_paper(title, authors, abstract, category, paper_url, originality):
         | 
| 29 | 
             
                if not originality:
         | 
| 30 | 
            -
                    return "You must confirm that this is your own  | 
| 31 |  | 
| 32 | 
             
                entry = {
         | 
| 33 | 
             
                    "id": str(uuid.uuid4()),
         | 
| @@ -49,13 +49,15 @@ with gr.Blocks() as demo: | |
| 49 | 
             
                    title = gr.Textbox(label="Title", placeholder="Enter paper title")
         | 
| 50 | 
             
                    authors = gr.Textbox(label="Authors", placeholder="Jane Doe, John Smith")
         | 
| 51 |  | 
| 52 | 
            -
                abstract = gr.Textbox(label=" | 
| 53 | 
             
                category = gr.Dropdown(
         | 
| 54 | 
            -
                    label=" | 
| 55 | 
            -
                    choices=[" | 
| 56 | 
            -
                    value=" | 
| 57 | 
             
                )
         | 
| 58 | 
            -
                paper_url = gr.Textbox(label="Paper URL (arXiv or PDF)", placeholder="https://...")
         | 
|  | |
|  | |
| 59 |  | 
| 60 | 
             
                originality = gr.Checkbox(label="I confirm this is my own work")
         | 
| 61 |  | 
| @@ -64,7 +66,7 @@ with gr.Blocks() as demo: | |
| 64 |  | 
| 65 | 
             
                submit_btn.click(
         | 
| 66 | 
             
                    fn=submit_paper,
         | 
| 67 | 
            -
                    inputs=[title, authors, abstract, category, paper_url, originality],
         | 
| 68 | 
             
                    outputs=output
         | 
| 69 | 
             
                )
         | 
| 70 |  | 
|  | |
| 27 |  | 
| 28 | 
             
            def submit_paper(title, authors, abstract, category, paper_url, originality):
         | 
| 29 | 
             
                if not originality:
         | 
| 30 | 
            +
                    return "You must confirm that this is your own work."
         | 
| 31 |  | 
| 32 | 
             
                entry = {
         | 
| 33 | 
             
                    "id": str(uuid.uuid4()),
         | 
|  | |
| 49 | 
             
                    title = gr.Textbox(label="Title", placeholder="Enter paper title")
         | 
| 50 | 
             
                    authors = gr.Textbox(label="Authors", placeholder="Jane Doe, John Smith")
         | 
| 51 |  | 
| 52 | 
            +
                abstract = gr.Textbox(label="Description", lines=6)
         | 
| 53 | 
             
                category = gr.Dropdown(
         | 
| 54 | 
            +
                    label="Domain",
         | 
| 55 | 
            +
                    choices=["Biology", "Chemistry", "Geospatial", "Climate", "Medicine", "Physics", "Energy", "Other"],
         | 
| 56 | 
            +
                    value="Biology"
         | 
| 57 | 
             
                )
         | 
| 58 | 
            +
                paper_url = gr.Textbox(label="Paper URL (arXiv or PDF or just nice blog post)", placeholder="https://...")
         | 
| 59 | 
            +
                hf_url = gr.Textbox(label="Artifact URL (should be on the Hub)", placeholder="https://...")
         | 
| 60 | 
            +
             | 
| 61 |  | 
| 62 | 
             
                originality = gr.Checkbox(label="I confirm this is my own work")
         | 
| 63 |  | 
|  | |
| 66 |  | 
| 67 | 
             
                submit_btn.click(
         | 
| 68 | 
             
                    fn=submit_paper,
         | 
| 69 | 
            +
                    inputs=[title, authors, abstract, category, paper_url, hf_url, originality],
         | 
| 70 | 
             
                    outputs=output
         | 
| 71 | 
             
                )
         | 
| 72 |  | 
