Spaces:
Sleeping
Sleeping
| <main> | |
| <section id="text-classification"> | |
| <head> | |
| <link rel="stylesheet" type="text/css" href="{{ url_for('static', filename= 'CSS/home.css')}}"> | |
| </head> | |
| <body> | |
| <h2>تصنيف المناطق </h2> | |
| <div align="center"> | |
| <h1>قم بإدخال جملة عربية لتصنيفها كواحدة من ثلاث مناطق</h1> | |
| <h1>مصر، الخليج العربي أو الشام</h1> | |
| <small><em>Enter an Arabic text to classify it to one of three regions:</em></small> | |
| <small><em>Egypt, Gulf or Levant</em></small></div> | |
| <br> | |
| <div align="center"> | |
| <form action="{{url_for('classify')}}" method="POST"> | |
| <textarea name="comment" required="true" rows="1" cols="40"></textarea> | |
| <br> | |
| <input id="text" type="submit" value="صَنِف" class="button-89"> | |
| <br> | |
| <div name = "output" id="output" style="visibility: hidden;"> | |
| <p class="output-statement">{{output}}</p> | |
| </div> | |
| <script> | |
| var text = document.getElementById("text").value | |
| document.getElementById("output").style="visibility: visible"; | |
| $('form').on('submit', function(event) { | |
| $.ajax({ | |
| type: 'POST', | |
| url: "{{ url_for( 'classify' ) }}", | |
| data: JSON.stringify({'input':text}), | |
| contentType: "application/json", | |
| success:function(response){ | |
| success: function(response) { | |
| document.write(response); | |
| document.getElementById("output").style="visibility: visible"; | |
| }, | |
| } | |
| }) | |
| </script> | |
| </form> | |
| </div> | |
| </body> | |
| </section> | |
| </main> | |