Spaces:
Build error
Build error
Update app.py
Browse files
app.py
CHANGED
|
@@ -18,14 +18,18 @@ def analyze_figure_of_speech(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 Bible analysis.
|
| 21 |
-
Analyze the following Bible verse to identify any figures of speech (e.g., Metaphor, Synecdoche, Hyperbole, Simile, Paradox).
|
| 22 |
-
Return your answer as a JSON array where each element includes:
|
| 23 |
- "verses": give the Bible verse in NJV,
|
| 24 |
- "figure": the type of figure of speech,
|
| 25 |
- "phrase": the exact phrase from the verse,
|
| 26 |
- "explanation": a brief explanation in biblical context.
|
| 27 |
Bible Verse: "{verse}"
|
| 28 |
-
[/INST] Figures
|
|
|
|
|
|
|
|
|
|
|
|
|
| 29 |
|
| 30 |
payload = {"inputs": prompt, "parameters": {"max_new_tokens": 250, "temperature": 0.5, "top_p": 0.9}}
|
| 31 |
|
|
|
|
| 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 Bible analysis.
|
| 21 |
+
Analyze the following Bible verse to identify any figures of speech (e.g., Metaphor, Synecdoche, Hyperbole, Simile, Paradox and other ones).
|
| 22 |
+
Return your answer as a JSON array where each element includes:
|
| 23 |
- "verses": give the Bible verse in NJV,
|
| 24 |
- "figure": the type of figure of speech,
|
| 25 |
- "phrase": the exact phrase from the verse,
|
| 26 |
- "explanation": a brief explanation in biblical context.
|
| 27 |
Bible Verse: "{verse}"
|
| 28 |
+
[/INST] Figures: </s>"""
|
| 29 |
+
|
| 30 |
+
# Print only the values
|
| 31 |
+
print("\n".join(str(value) for value in data.values() if value))
|
| 32 |
+
|
| 33 |
|
| 34 |
payload = {"inputs": prompt, "parameters": {"max_new_tokens": 250, "temperature": 0.5, "top_p": 0.9}}
|
| 35 |
|