-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathapp_py.py
38 lines (30 loc) · 1.12 KB
/
app_py.py
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
38
# -*- coding: utf-8 -*-
"""app.py
Automatically generated by Colaboratory.
Original file is located at
https://colab.research.google.com/drive/1x8sYHjhmhWqKGYCMifjHjYXN_-tFfLqr
"""
from ._anvil_designer import Form1Template
from anvil import *
import anvil
import anvil.tables as tables
import anvil.tables.query as q
from anvil.tables import app_tables
class Form1(Form1Template):
def __init__(self, **properties):
# Set Form properties and Data Bindings.
self.init_components(**properties)
self.button_1.add_event_handler('click', self.handle_click)
# Any code you write here will run when the form opens.
def Input_Text_change(self, **event_args):
Input_Text = self.Input_Text.text
print(Input_Text,event_args)
#def primary_color_1_click(self, **event_args):
#self.SUBMIT.text = "Click me"
anvil_result = anvil.server.call('annotate_text',Input_Text)
self.annotated_text.text = anvil_result
self.handle_click()
#self.annotated_text.text = '<answer from NLP Model>'
#self.handle_click.add_event_handler('click', self.handle_click)
def handle_click(self, **event_arg):
pass