File size: 932 Bytes
10c0296
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
39
40
41
42
43
44
---
language: en
datasets:
- custom
task_categories:
- text-classification
task_ids:
- sentiment-classification
license: mit
---

Github link: 
- https://github.com/hennypurwadi/Alpaca_finetune_sentiment_analysis

```python

import os
import sys

import fire
import gradio as gr
import torch
import transformers
from peft import PeftModel
from transformers import GenerationConfig, LlamaForCausalLM, LlamaTokenizer

!git clone https://github.com/tloen/alpaca-lora.git
%cd alpaca-lora
!git c!python generate.py \
    --load_8bit \
    --base_model 'decapoda-research/llama-7b-hf' \
    --lora_weights 'RinInori/alpaca_finetune_6_sentiments' \
    --share_gradio    

!python generate.py \
    --load_8bit \
    --base_model 'decapoda-research/llama-7b-hf' \
    --lora_weights 'RinInori/alpaca_finetune_6_sentiments' \
    --share_gradio

#Click on output(For example:)
Running on local URL:  http://

Running on public URL: https://