deeksonparlma commited on
Commit
53a236e
·
1 Parent(s): 6db7a34

prediction

Browse files
Files changed (2) hide show
  1. app.py +2 -2
  2. retrain.ipynb +33 -0
app.py CHANGED
@@ -34,8 +34,8 @@ def classify_text(inp):
34
  # X = vectorizer.fit_transform(inp)
35
  # reshape the input to 2D
36
  # convert the input to a numpy array
37
- return model.predict( np.array(inp).reshape(1, -1) )
38
- # return model.predict( np.array(inp).reshape(1, -1) )[0]
39
 
40
 
41
 
 
34
  # X = vectorizer.fit_transform(inp)
35
  # reshape the input to 2D
36
  # convert the input to a numpy array
37
+ # return model.predict( np.array(inp).reshape(1, -1) )
38
+ return model.predict( np.array(inp).reshape(1, -1) )[0]
39
 
40
 
41
 
retrain.ipynb ADDED
@@ -0,0 +1,33 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "cells": [
3
+ {
4
+ "cell_type": "code",
5
+ "execution_count": null,
6
+ "metadata": {},
7
+ "outputs": [],
8
+ "source": [
9
+ "from transformers import AutoTokenizer, AutoModelForSequenceClassification\n",
10
+ "\n"
11
+ ]
12
+ }
13
+ ],
14
+ "metadata": {
15
+ "kernelspec": {
16
+ "display_name": "Python 3",
17
+ "language": "python",
18
+ "name": "python3"
19
+ },
20
+ "language_info": {
21
+ "name": "python",
22
+ "version": "3.10.7"
23
+ },
24
+ "orig_nbformat": 4,
25
+ "vscode": {
26
+ "interpreter": {
27
+ "hash": "916dbcbb3f70747c44a77c7bcd40155683ae19c65e1c03b4aa3499c5328201f1"
28
+ }
29
+ }
30
+ },
31
+ "nbformat": 4,
32
+ "nbformat_minor": 2
33
+ }