Spaces:
Sleeping
Sleeping
jed-tiotuico
commited on
Commit
•
6fb2e02
1
Parent(s):
3eceb46
use absolute path
Browse files
app.py
CHANGED
@@ -1,6 +1,7 @@
|
|
1 |
import datetime
|
2 |
from google.protobuf import message
|
3 |
import torch
|
|
|
4 |
import json
|
5 |
import time
|
6 |
import threading
|
@@ -343,9 +344,11 @@ if st.button("your website is straight up garbage. how do you sell high end tech
|
|
343 |
)
|
344 |
)
|
345 |
|
346 |
-
if st.button("Generate
|
347 |
num_prompt_instructions = 8
|
348 |
-
|
|
|
|
|
349 |
seed_instructions = [t["text"] for t in seed_tasks]
|
350 |
prompt_instructions = []
|
351 |
prompt_instructions += random.sample(seed_instructions, num_prompt_instructions - len(prompt_instructions))
|
@@ -413,7 +416,8 @@ st.markdown("""Zhang Peiyuan's TinyLlama https://github.com/jzhang38/TinyLlama""
|
|
413 |
st.markdown("""Rohan Taori, Ishaan Gulrajani, Tianyi Zhang, Yann Dubois,
|
414 |
Xuechen Li, Carlos Guestrin, Percy Liang, Tatsunori B. Hashimoto
|
415 |
- [Alpaca: A Strong, Replicable Instruction-Following Model](https://crfm.stanford.edu/2023/03/13/alpaca.html)""")
|
416 |
-
|
|
|
417 |
if True:
|
418 |
gpu_stats = torch.cuda.get_device_properties(0)
|
419 |
max_memory = gpu_stats.total_memory / 1024 ** 3
|
|
|
1 |
import datetime
|
2 |
from google.protobuf import message
|
3 |
import torch
|
4 |
+
import os
|
5 |
import json
|
6 |
import time
|
7 |
import threading
|
|
|
344 |
)
|
345 |
)
|
346 |
|
347 |
+
if st.button("Generate Printer Issue Based on Seed Tasks"):
|
348 |
num_prompt_instructions = 8
|
349 |
+
current_dir = os.path.dirname(os.path.abspath(__file__))
|
350 |
+
printer_seed_file_path = os.path.join(current_dir, "printer-seed.jsonl")
|
351 |
+
seed_tasks = [json.loads(l) for l in open(printer_seed_file_path, "r")]
|
352 |
seed_instructions = [t["text"] for t in seed_tasks]
|
353 |
prompt_instructions = []
|
354 |
prompt_instructions += random.sample(seed_instructions, num_prompt_instructions - len(prompt_instructions))
|
|
|
416 |
st.markdown("""Rohan Taori, Ishaan Gulrajani, Tianyi Zhang, Yann Dubois,
|
417 |
Xuechen Li, Carlos Guestrin, Percy Liang, Tatsunori B. Hashimoto
|
418 |
- [Alpaca: A Strong, Replicable Instruction-Following Model](https://crfm.stanford.edu/2023/03/13/alpaca.html)""")
|
419 |
+
st.markdown("""Self-Instruct: Aligning Language Models with Self-Generated Instructions
|
420 |
+
Yizhong Wang, Yeganeh Kordi, Swaroop Mishra, Alisa Liu, Noah A. Smith, Daniel Khashabi, Hannaneh Hajishirzi https://arxiv.org/abs/2212.10560""")
|
421 |
if True:
|
422 |
gpu_stats = torch.cuda.get_device_properties(0)
|
423 |
max_memory = gpu_stats.total_memory / 1024 ** 3
|