Spaces:
Runtime error
Runtime error
AnnaPalatkina
commited on
Commit
•
c028611
1
Parent(s):
ae75f7c
Update app.py
Browse files
app.py
CHANGED
@@ -16,7 +16,9 @@ This space provides a gradio demo and an easy-to-run wrapper of the pre-trained
|
|
16 |
|
17 |
Information about project you an fine on the website of [University of Oslo](https://www.mn.uio.no/ifi/english/research/projects/sant/)
|
18 |
|
19 |
-
|
|
|
|
|
20 |
```python
|
21 |
>>> from sentiment_wrapper import PredictionModel
|
22 |
>>> model = PredictionModel()
|
@@ -24,7 +26,9 @@ The model can be easily used for predicting sentiment as follows:
|
|
24 |
[5,5]
|
25 |
```
|
26 |
|
27 |
-
|
|
|
|
|
28 |
-dataframe: pandas dataframe with columns ['text', 'label', 'split'] with 3 possible values in 'split' ['train','dev','test']
|
29 |
-model: pre-traied model from huggingface or path to local folder with config.json in case you want to use custom wrapper
|
30 |
<ul>
|
|
|
16 |
|
17 |
Information about project you an fine on the website of [University of Oslo](https://www.mn.uio.no/ifi/english/research/projects/sant/)
|
18 |
|
19 |
+
## How to do inference?
|
20 |
+
|
21 |
+
Specify in config.json which model from saved_models you want to use. The model can be easily used for predicting sentiment as follows:
|
22 |
```python
|
23 |
>>> from sentiment_wrapper import PredictionModel
|
24 |
>>> model = PredictionModel()
|
|
|
26 |
[5,5]
|
27 |
```
|
28 |
|
29 |
+
## How to fine-tune?
|
30 |
+
|
31 |
+
For this run fine-tune.py and specify required arguments:
|
32 |
-dataframe: pandas dataframe with columns ['text', 'label', 'split'] with 3 possible values in 'split' ['train','dev','test']
|
33 |
-model: pre-traied model from huggingface or path to local folder with config.json in case you want to use custom wrapper
|
34 |
<ul>
|