Update app.py
Browse files
app.py
CHANGED
|
@@ -210,16 +210,43 @@ with gr.Blocks(css=custom_css, theme=gr.themes.Default()) as demo:
|
|
| 210 |
"</div>"
|
| 211 |
)
|
| 212 |
|
| 213 |
-
with gr.Accordion("Example Sentences", open=
|
| 214 |
-
gr.
|
| 215 |
-
|
| 216 |
-
|
| 217 |
-
|
| 218 |
-
|
| 219 |
-
|
| 220 |
-
|
| 221 |
-
|
| 222 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 223 |
)
|
| 224 |
|
| 225 |
input_text.change(
|
|
|
|
| 210 |
"</div>"
|
| 211 |
)
|
| 212 |
|
| 213 |
+
with gr.Accordion("Example Sentences", open=True):
|
| 214 |
+
with gr.Row():
|
| 215 |
+
example_text = gr.Textbox(
|
| 216 |
+
value="The drilling operation at well site A-15 encountered unexpected high-pressure zones at 3,247 meters depth, requiring immediate adjustment of mud weight from 1.65 to 1.82 specific gravity to maintain wellbore stability and prevent potential kicks.",
|
| 217 |
+
label="",
|
| 218 |
+
lines=3,
|
| 219 |
+
max_lines=5,
|
| 220 |
+
show_copy_button=True
|
| 221 |
+
)
|
| 222 |
+
use_example_btn = gr.Button("Use This Example →", variant="primary", size="sm")
|
| 223 |
+
|
| 224 |
+
with gr.Row():
|
| 225 |
+
gr.Button("Drilling Report", size="sm").click(
|
| 226 |
+
lambda: "The drilling operation at well site A-15 encountered unexpected high-pressure zones at 3,247 meters depth, requiring immediate adjustment of mud weight from 1.65 to 1.82 specific gravity to maintain wellbore stability and prevent potential kicks.",
|
| 227 |
+
outputs=example_text
|
| 228 |
+
)
|
| 229 |
+
gr.Button("Reservoir Analysis", size="sm").click(
|
| 230 |
+
lambda: "Reservoaret viser utmerket permeabilitet på 250 millidarcy og porøsitet på 22 prosent basert på kjerneanalyse, noe som indikerer betydelig hydrokarbonpotensial med estimert oljemetning på 65 prosent.",
|
| 231 |
+
outputs=example_text
|
| 232 |
+
)
|
| 233 |
+
gr.Button("Subsea System", size="sm").click(
|
| 234 |
+
lambda: "The subsea production system consists of a vertical Christmas tree rated for 10,000 psi working pressure and 150 degrees Celsius temperature, equipped with redundant safety features including automatic shutdown valves and real-time pressure monitoring systems.",
|
| 235 |
+
outputs=example_text
|
| 236 |
+
)
|
| 237 |
+
gr.Button("Seismic Data", size="sm").click(
|
| 238 |
+
lambda: "Seismiske data bekrefter tilstedeværelsen av en strukturell felle med estimert areal på 12 kvadratkilometer, og produktivitetstester viser stabilisert oljeproduksjon på 3,400 fat per dag ved optimaliseringstrykk på 2,100 psi.",
|
| 239 |
+
outputs=example_text
|
| 240 |
+
)
|
| 241 |
+
gr.Button("Safety Procedure", size="sm").click(
|
| 242 |
+
lambda: "Emergency response procedures require all personnel to complete H2S safety training before site access, with breathing apparatus and wind indicators positioned at designated muster points, and immediate evacuation protocols activated when gas detection exceeds 10 ppm concentration levels.",
|
| 243 |
+
outputs=example_text
|
| 244 |
+
)
|
| 245 |
+
|
| 246 |
+
use_example_btn.click(
|
| 247 |
+
fn=lambda x: x,
|
| 248 |
+
inputs=example_text,
|
| 249 |
+
outputs=input_text
|
| 250 |
)
|
| 251 |
|
| 252 |
input_text.change(
|