Update app.py
Browse files
app.py
CHANGED
|
@@ -293,7 +293,9 @@ def ui_analyze(selected_idx: Optional[int], df: pd.DataFrame,
|
|
| 293 |
|
| 294 |
# Call model
|
| 295 |
try:
|
| 296 |
-
merged = f"[SYSTEM INSTRUCTION: {sys_inst}]
|
|
|
|
|
|
|
| 297 |
resp = client.models.generate_content(model=model_name, contents=[uploaded_file, merged])
|
| 298 |
text = getattr(resp, "text", None)
|
| 299 |
if not text:
|
|
@@ -347,7 +349,7 @@ with gr.Blocks(title="Vochi CRM + Gemini (Gradio)") as demo:
|
|
| 347 |
file_out = gr.File(label="MP3 для сцягвання")
|
| 348 |
status_fetch = gr.Markdown()
|
| 349 |
|
| 350 |
-
with gr.Tab("AI Analysis (Gemini)"):
|
| 351 |
with gr.Row():
|
| 352 |
tpl_dd = gr.Dropdown(choices=TPL_OPTIONS, value="simple", label="Шаблон")
|
| 353 |
lang_dd = gr.Dropdown(choices=LANG_OPTIONS, value="default", label="Мова")
|
|
|
|
| 293 |
|
| 294 |
# Call model
|
| 295 |
try:
|
| 296 |
+
merged = f"[SYSTEM INSTRUCTION: {sys_inst}]
|
| 297 |
+
|
| 298 |
+
{prompt}"
|
| 299 |
resp = client.models.generate_content(model=model_name, contents=[uploaded_file, merged])
|
| 300 |
text = getattr(resp, "text", None)
|
| 301 |
if not text:
|
|
|
|
| 349 |
file_out = gr.File(label="MP3 для сцягвання")
|
| 350 |
status_fetch = gr.Markdown()
|
| 351 |
|
| 352 |
+
with gr.Tab("AI Analysis (Gemini)"):
|
| 353 |
with gr.Row():
|
| 354 |
tpl_dd = gr.Dropdown(choices=TPL_OPTIONS, value="simple", label="Шаблон")
|
| 355 |
lang_dd = gr.Dropdown(choices=LANG_OPTIONS, value="default", label="Мова")
|