Create README.md
Browse files
README.md
ADDED
@@ -0,0 +1,44 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
---
|
2 |
+
language: en
|
3 |
+
datasets:
|
4 |
+
- custom
|
5 |
+
task_categories:
|
6 |
+
- text-classification
|
7 |
+
task_ids:
|
8 |
+
- sentiment-classification
|
9 |
+
license: mit
|
10 |
+
---
|
11 |
+
|
12 |
+
Github link:
|
13 |
+
- https://github.com/hennypurwadi/Alpaca_finetune_sentiment_analysis
|
14 |
+
|
15 |
+
```python
|
16 |
+
|
17 |
+
import os
|
18 |
+
import sys
|
19 |
+
|
20 |
+
import fire
|
21 |
+
import gradio as gr
|
22 |
+
import torch
|
23 |
+
import transformers
|
24 |
+
from peft import PeftModel
|
25 |
+
from transformers import GenerationConfig, LlamaForCausalLM, LlamaTokenizer
|
26 |
+
|
27 |
+
!git clone https://github.com/tloen/alpaca-lora.git
|
28 |
+
%cd alpaca-lora
|
29 |
+
!git c!python generate.py \
|
30 |
+
--load_8bit \
|
31 |
+
--base_model 'decapoda-research/llama-7b-hf' \
|
32 |
+
--lora_weights 'RinInori/alpaca_finetune_6_sentiments' \
|
33 |
+
--share_gradio
|
34 |
+
|
35 |
+
!python generate.py \
|
36 |
+
--load_8bit \
|
37 |
+
--base_model 'decapoda-research/llama-7b-hf' \
|
38 |
+
--lora_weights 'RinInori/alpaca_finetune_6_sentiments' \
|
39 |
+
--share_gradio
|
40 |
+
|
41 |
+
#Click on output(For example:)
|
42 |
+
Running on local URL: http://
|
43 |
+
|
44 |
+
Running on public URL: https://
|