Spaces:
Runtime error
Runtime error
Commit
·
7ddcdfa
1
Parent(s):
7438e40
Added text to function
Browse files
app.py
CHANGED
|
@@ -12,13 +12,12 @@ ptb = []
|
|
| 12 |
with open('ptb.jsonl', 'r') as f:
|
| 13 |
for l in f:
|
| 14 |
ptb.append(json.loads(l))
|
| 15 |
-
|
| 16 |
-
for gid in tqdm(gid_list, desc='Query'):
|
| 17 |
-
text = ptb[gid]['text']
|
| 18 |
|
| 19 |
# Function to process text based on model and task
|
| 20 |
def process_text(model_name, task, text):
|
| 21 |
-
|
|
|
|
|
|
|
| 22 |
# Define prompts for each strategy based on the task
|
| 23 |
strategy_prompts = {
|
| 24 |
'Strategy 1': template_all.format(text),
|
|
|
|
| 12 |
with open('ptb.jsonl', 'r') as f:
|
| 13 |
for l in f:
|
| 14 |
ptb.append(json.loads(l))
|
|
|
|
|
|
|
|
|
|
| 15 |
|
| 16 |
# Function to process text based on model and task
|
| 17 |
def process_text(model_name, task, text):
|
| 18 |
+
for gid in tqdm(gid_list, desc='Query'):
|
| 19 |
+
text = ptb[gid]['text']
|
| 20 |
+
|
| 21 |
# Define prompts for each strategy based on the task
|
| 22 |
strategy_prompts = {
|
| 23 |
'Strategy 1': template_all.format(text),
|