Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -10,7 +10,7 @@ import spaces
|
|
| 10 |
|
| 11 |
|
| 12 |
# Model configuration
|
| 13 |
-
MODEL_ID = "oberbics/llama-3.1-
|
| 14 |
|
| 15 |
|
| 16 |
SYSTEM_PROMPT = """You are an expert at analyzing historical texts and you hate to summarize
|
|
@@ -26,7 +26,6 @@ OUTPUT FORMAT - EXACTLY these 4 XML tags and NOTHING else:
|
|
| 26 |
<explanation>The prefect explicitly argues that existing help is "insufficient" and makes a direct claim that "extraordinary measures" are needed, presenting a clear premise-conclusion structure about the inadequacy of current response.</explanation>
|
| 27 |
<human_verification_needed>False</human_verification_needed>
|
| 28 |
|
| 29 |
-
|
| 30 |
EXAMPLE WITHOUT ARGUMENT:
|
| 31 |
<argument>NA</argument>
|
| 32 |
<claim>NA</claim>
|
|
@@ -34,6 +33,9 @@ EXAMPLE WITHOUT ARGUMENT:
|
|
| 34 |
<human_verification_needed>FALSE</human_verification_needed>
|
| 35 |
|
| 36 |
RULES:
|
|
|
|
|
|
|
|
|
|
| 37 |
- NO SUMMARY; ONLY EXACT EXTRACTOM FROM THE TEXT; don't extract anything that is not in the text. Only extract word by word
|
| 38 |
- ONLY output these 4 XML tags
|
| 39 |
- Extract only original text without changes or use NA when you did not find an argument
|
|
@@ -41,12 +43,11 @@ RULES:
|
|
| 41 |
- The CLAIM should say what the (implicite) argument implies, what the main conclusion is
|
| 42 |
- Give attention to implicit argumetns
|
| 43 |
- In cases of uncertainty or ambiguity, say human_verification_needed TRUE
|
| 44 |
-
- If no argument exists, use NA for
|
| 45 |
- More than one argument possible for one aticle, one unit has one clear clame and all the xml structures
|
| 46 |
|
| 47 |
VERIFICATION: BEfore you print the results, double check claims and explanations of the argument. When the claim is just a translation or the explanation states that this is not an argument, don't print it"""
|
| 48 |
|
| 49 |
-
|
| 50 |
print("Loading tokenizer...")
|
| 51 |
tokenizer = AutoTokenizer.from_pretrained(MODEL_ID)
|
| 52 |
tokenizer.pad_token = tokenizer.eos_token
|
|
|
|
| 10 |
|
| 11 |
|
| 12 |
# Model configuration
|
| 13 |
+
MODEL_ID = "oberbics/llama-3.1-argument_mining-v2"
|
| 14 |
|
| 15 |
|
| 16 |
SYSTEM_PROMPT = """You are an expert at analyzing historical texts and you hate to summarize
|
|
|
|
| 26 |
<explanation>The prefect explicitly argues that existing help is "insufficient" and makes a direct claim that "extraordinary measures" are needed, presenting a clear premise-conclusion structure about the inadequacy of current response.</explanation>
|
| 27 |
<human_verification_needed>False</human_verification_needed>
|
| 28 |
|
|
|
|
| 29 |
EXAMPLE WITHOUT ARGUMENT:
|
| 30 |
<argument>NA</argument>
|
| 31 |
<claim>NA</claim>
|
|
|
|
| 33 |
<human_verification_needed>FALSE</human_verification_needed>
|
| 34 |
|
| 35 |
RULES:
|
| 36 |
+
- NEVER REPEAT ARGUMENTS, NEVER PRINT ARGUMENTS DOUBLE
|
| 37 |
+
- TRUE FOR VERIFICATION WHEN UNCERTAIN
|
| 38 |
+
- Only output arguments that appear verbatim (or nearly verbatim) in the text
|
| 39 |
- NO SUMMARY; ONLY EXACT EXTRACTOM FROM THE TEXT; don't extract anything that is not in the text. Only extract word by word
|
| 40 |
- ONLY output these 4 XML tags
|
| 41 |
- Extract only original text without changes or use NA when you did not find an argument
|
|
|
|
| 43 |
- The CLAIM should say what the (implicite) argument implies, what the main conclusion is
|
| 44 |
- Give attention to implicit argumetns
|
| 45 |
- In cases of uncertainty or ambiguity, say human_verification_needed TRUE
|
| 46 |
+
- If no argument exists, use NA for ALL fields without explanation except <human_verification_needed>FALSE or TRUE</human_verification_needed>
|
| 47 |
- More than one argument possible for one aticle, one unit has one clear clame and all the xml structures
|
| 48 |
|
| 49 |
VERIFICATION: BEfore you print the results, double check claims and explanations of the argument. When the claim is just a translation or the explanation states that this is not an argument, don't print it"""
|
| 50 |
|
|
|
|
| 51 |
print("Loading tokenizer...")
|
| 52 |
tokenizer = AutoTokenizer.from_pretrained(MODEL_ID)
|
| 53 |
tokenizer.pad_token = tokenizer.eos_token
|