Spaces:
Build error
Build error
Update app.py
Browse files
app.py
CHANGED
|
@@ -17,16 +17,41 @@ def analyze_figure_of_speech(verse):
|
|
| 17 |
return "Please enter a Bible verse."
|
| 18 |
|
| 19 |
# Construct a prompt to instruct the model to analyze figures of speech in the verse.
|
| 20 |
-
prompt = f"""<s>[INST] You are JR-Sacred Syntax, an expert biblical scholar specializing in the analysis of Bible verses.
|
| 21 |
-
|
| 22 |
-
|
| 23 |
-
|
| 24 |
-
|
| 25 |
-
|
| 26 |
-
|
| 27 |
-
|
| 28 |
-
|
| 29 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 30 |
|
| 31 |
payload = {
|
| 32 |
"inputs": prompt,
|
|
|
|
| 17 |
return "Please enter a Bible verse."
|
| 18 |
|
| 19 |
# Construct a prompt to instruct the model to analyze figures of speech in the verse.
|
| 20 |
+
prompt = f"""Y<s>[INST] You are JR-Sacred Syntax, an expert biblical scholar specializing in the analysis of Bible verses.
|
| 21 |
+
Your task is to analyze the given Bible verse and determine if it contains a figure of speech such as Synecdoche, Metonymy, Hyperbole, Simile, or Paradox.
|
| 22 |
+
|
| 23 |
+
Follow this structured output format:
|
| 24 |
+
|
| 25 |
+
{
|
| 26 |
+
"verse": "[Provide the NKJV Bible verse]",
|
| 27 |
+
"figure": "[Identify the figure of speech]",
|
| 28 |
+
"explanation": "[Give a clear explanation similar to the reference examples]",
|
| 29 |
+
"examples": [
|
| 30 |
+
{
|
| 31 |
+
"phrase": "[Identify the phrase from the verse]",
|
| 32 |
+
"analysis": "[Explain why this phrase qualifies as the identified figure of speech]"
|
| 33 |
+
}
|
| 34 |
+
]
|
| 35 |
+
}
|
| 36 |
+
|
| 37 |
+
Use the reference structure below to format your analysis:
|
| 38 |
+
|
| 39 |
+
Example:
|
| 40 |
+
{
|
| 41 |
+
"verse": "Acts 5:9 - 'The feet of those who have buried your husband are at the door…'",
|
| 42 |
+
"figure": "Synecdoche",
|
| 43 |
+
"explanation": "'Feet' here stands for the entire persons (the men) who buried her husband. It focuses on one part (their feet) to represent the whole person.",
|
| 44 |
+
"examples": [
|
| 45 |
+
{
|
| 46 |
+
"phrase": "feet",
|
| 47 |
+
"analysis": "The term 'feet' is used to represent the whole person."
|
| 48 |
+
}
|
| 49 |
+
]
|
| 50 |
+
}
|
| 51 |
+
|
| 52 |
+
Now, analyze the following Bible verse:
|
| 53 |
+
"{verse}"
|
| 54 |
+
[/INST]</s>"""
|
| 55 |
|
| 56 |
payload = {
|
| 57 |
"inputs": prompt,
|