Update visualqa.html
Browse files- visualqa.html +2 -6
    	
        visualqa.html
    CHANGED
    
    | @@ -112,9 +112,6 @@ | |
| 112 | 
             
                    Output will be here
         | 
| 113 | 
             
                </div>
         | 
| 114 |  | 
| 115 | 
            -
                <p>Check out the <a class="underline text-blue-500"
         | 
| 116 | 
            -
                                    href="https://huggingface.co/spaces/huggingfacejs/doc-vis-qa/blob/main/index.html"
         | 
| 117 | 
            -
                                    target="_blank">source code</a></p>
         | 
| 118 | 
             
            </form>
         | 
| 119 |  | 
| 120 | 
             
            <script type="module">
         | 
| @@ -139,10 +136,9 @@ | |
| 139 | 
             
                        const question = document.getElementById("question").value.trim();
         | 
| 140 | 
             
                        document.getElementById("logs").textContent = "";
         | 
| 141 | 
             
                        const method = model_type === "document" ? hf.documentQuestionAnswering : hf.visualQuestionAnswering;
         | 
| 142 | 
            -
                        const result = await method({model, inputs: {   | 
| 143 | 
            -
                            image, question
         | 
| 144 | 
             
                            }});
         | 
| 145 | 
            -
                        document.getElementById("logs").textContent = JSON.stringify(result, null, 2);  | 
| 146 | 
             
                    } catch (err) {
         | 
| 147 | 
             
                        alert("Error: " + err.message);
         | 
| 148 | 
             
                    } finally {
         | 
|  | |
| 112 | 
             
                    Output will be here
         | 
| 113 | 
             
                </div>
         | 
| 114 |  | 
|  | |
|  | |
|  | |
| 115 | 
             
            </form>
         | 
| 116 |  | 
| 117 | 
             
            <script type="module">
         | 
|  | |
| 136 | 
             
                        const question = document.getElementById("question").value.trim();
         | 
| 137 | 
             
                        document.getElementById("logs").textContent = "";
         | 
| 138 | 
             
                        const method = model_type === "document" ? hf.documentQuestionAnswering : hf.visualQuestionAnswering;
         | 
| 139 | 
            +
                        const result = await method({model, inputs: {  
         | 
|  | |
| 140 | 
             
                            }});
         | 
| 141 | 
            +
                        document.getElementById("logs").textContent = JSON.stringify(result, null, 2); 
         | 
| 142 | 
             
                    } catch (err) {
         | 
| 143 | 
             
                        alert("Error: " + err.message);
         | 
| 144 | 
             
                    } finally {
         |