Spaces:
Paused
Paused
Update app.py
Browse files
app.py
CHANGED
|
@@ -24,7 +24,7 @@ def decision(png_file_path, client, lmm: str) -> str:
|
|
| 24 |
|
| 25 |
image_data = generate_data_uri(png_file_path)
|
| 26 |
|
| 27 |
-
|
| 28 |
You are an expert in cricket tasked to judge whether a batter is out by Leg Before Wicket (LBW). You will be presented with an image of the ball hitting a batter's pads and you will have to make a decision whether the batter is to be judged out or not applying the following rules.
|
| 29 |
|
| 30 |
There are three important zones to consider while making your decision.
|
|
@@ -47,10 +47,13 @@ def decision(png_file_path, client, lmm: str) -> str:
|
|
| 47 |
"""
|
| 48 |
|
| 49 |
decision_prompt = [
|
|
|
|
|
|
|
|
|
|
|
|
|
| 50 |
{
|
| 51 |
'role': 'user',
|
| 52 |
'content': [
|
| 53 |
-
{"type": "text", "text": user_message},
|
| 54 |
{"type": "image_url", "image_url": {"url": image_data}}
|
| 55 |
]
|
| 56 |
}
|
|
|
|
| 24 |
|
| 25 |
image_data = generate_data_uri(png_file_path)
|
| 26 |
|
| 27 |
+
system_message = """
|
| 28 |
You are an expert in cricket tasked to judge whether a batter is out by Leg Before Wicket (LBW). You will be presented with an image of the ball hitting a batter's pads and you will have to make a decision whether the batter is to be judged out or not applying the following rules.
|
| 29 |
|
| 30 |
There are three important zones to consider while making your decision.
|
|
|
|
| 47 |
"""
|
| 48 |
|
| 49 |
decision_prompt = [
|
| 50 |
+
{
|
| 51 |
+
'role': 'system',
|
| 52 |
+
'content': system_message
|
| 53 |
+
},
|
| 54 |
{
|
| 55 |
'role': 'user',
|
| 56 |
'content': [
|
|
|
|
| 57 |
{"type": "image_url", "image_url": {"url": image_data}}
|
| 58 |
]
|
| 59 |
}
|