Spaces:
Sleeping
Sleeping
Update app.py
Browse fileschange token to token_r
add token_w
app.py
CHANGED
|
@@ -1,5 +1,6 @@
|
|
| 1 |
import os
|
| 2 |
-
|
|
|
|
| 3 |
import torch
|
| 4 |
import gradio as gr
|
| 5 |
from unsloth import FastLanguageModel
|
|
@@ -17,7 +18,7 @@ model, tokenizer = FastLanguageModel.from_pretrained(
|
|
| 17 |
dtype = None,
|
| 18 |
load_in_4bit = True,
|
| 19 |
)
|
| 20 |
-
model.load_adapter(peft_model_adapter_id, token=
|
| 21 |
|
| 22 |
terminators = [
|
| 23 |
tokenizer.eos_token_id,
|
|
@@ -93,7 +94,7 @@ Interventional Model:
|
|
| 93 |
Masking:"""
|
| 94 |
|
| 95 |
|
| 96 |
-
hf_writer = gr.HuggingFaceDatasetSaver("criteria-feedback-demo",
|
| 97 |
with gr.Blocks() as demo:
|
| 98 |
with gr.Row():
|
| 99 |
with gr.Column():
|
|
|
|
| 1 |
import os
|
| 2 |
+
token_r=os.environ['token_r']
|
| 3 |
+
token_w=os.environ['token_w']
|
| 4 |
import torch
|
| 5 |
import gradio as gr
|
| 6 |
from unsloth import FastLanguageModel
|
|
|
|
| 18 |
dtype = None,
|
| 19 |
load_in_4bit = True,
|
| 20 |
)
|
| 21 |
+
model.load_adapter(peft_model_adapter_id, token=token_r)
|
| 22 |
|
| 23 |
terminators = [
|
| 24 |
tokenizer.eos_token_id,
|
|
|
|
| 94 |
Masking:"""
|
| 95 |
|
| 96 |
|
| 97 |
+
hf_writer = gr.HuggingFaceDatasetSaver("criteria-feedback-demo",token_w, private=True)
|
| 98 |
with gr.Blocks() as demo:
|
| 99 |
with gr.Row():
|
| 100 |
with gr.Column():
|