File size: 943 Bytes
b6d576a
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
<div>
    <div class="form-group">
      <label>HTML/XML Input</label>
      <textarea
        id="html-input"
        class="form-control"
        rows="10"
        placeholder="Paste your HTML/XML here..."
      ></textarea>
    </div>
  
    <div class="form-group">
      <label>Question</label>
      <textarea
        id="question-input"
        class="form-control"
        rows="2"
        placeholder="Enter your question..."
      ></textarea>
    </div>
  
    <script>
      // This function will be called when the user clicks "Compute"
      async function query() {
        const html = document.querySelector("#html-input").value;
        const question = document.querySelector("#question-input").value;
        
        // Combine inputs into the JSON format your handler expects
        return {
          inputs: {
            html: html,
            question: question
          }
        };
      }
    </script>
  </div>