sotosbarl commited on
Commit
40ad2a7
1 Parent(s): a387e5c

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +15 -11
app.py CHANGED
@@ -12,7 +12,7 @@ classifier = pipeline("zero-shot-classification", model="MoritzLaurer/mDeBERTa-v
12
 
13
  # with open('chapter_titles.pkl', 'rb') as file:
14
  # titles_astiko = pickle.load(file)
15
- # labels1 = ["κληρονομικό", "ακίνητα", "διαζύγιο"]
16
  # labels2 = ["αποδοχή κληρονομιάς", "αποποίηση", "διαθήκη"]
17
  # labels3 = ["μίσθωση", "κυριότητα", "έξωση", "απλήρωτα νοίκια"]
18
 
@@ -32,23 +32,27 @@ text = st.text_input('Enter some text:') # Input field for new text
32
 
33
  if text:
34
 
35
- labels = list(dictionary)
36
 
37
- output = classify(text,labels)
38
 
39
- output = output["labels"][0]
40
 
41
- labels = list(dictionary[output])
42
 
43
- output2 = classify(text,labels)
44
 
45
- output2 = output2["labels"][0]
46
 
47
 
48
- answer = dictionary[output][output2]
49
 
50
- st.text(output)
51
- st.text(output2)
 
 
52
 
53
- st.text(answer)
 
 
54
 
 
12
 
13
  # with open('chapter_titles.pkl', 'rb') as file:
14
  # titles_astiko = pickle.load(file)
15
+ labels1 = ["κληρονομικό", "ακίνητα", "διαζύγιο"]
16
  # labels2 = ["αποδοχή κληρονομιάς", "αποποίηση", "διαθήκη"]
17
  # labels3 = ["μίσθωση", "κυριότητα", "έξωση", "απλήρωτα νοίκια"]
18
 
 
32
 
33
  if text:
34
 
35
+ # labels = list(dictionary)
36
 
37
+ # output = classify(text,labels)
38
 
39
+ # output = output["labels"][0]
40
 
41
+ # labels = list(dictionary[output])
42
 
43
+ # output2 = classify(text,labels)
44
 
45
+ # output2 = output2["labels"][0]
46
 
47
 
48
+ # answer = dictionary[output][output2]
49
 
50
+ # st.text(output)
51
+ # st.text(output2)
52
+
53
+ # st.text(answer)
54
 
55
+
56
+ output = classify(text,labels1)
57
+ st.text(output)
58