MilanM commited on
Commit
a53a500
·
verified ·
1 Parent(s): 2268215

Update app_v3.py

Browse files
Files changed (1) hide show
  1. app_v3.py +4 -4
app_v3.py CHANGED
@@ -271,9 +271,9 @@ def _(mo, prompt_editor, template_selector):
271
 
272
  @app.cell
273
  def _(mo, prompt_editor):
274
- _ = prompt_editor.value['editor']
275
 
276
- if prompt_editor.value['editor']:
277
  prompt_printout = mo.md(f"**Current prompt template:**\n\n {prompt_editor.value['editor']}")
278
  else:
279
  prompt_printout = mo.md(f"**Submit a prompt template.**")
@@ -284,9 +284,9 @@ def _(mo, prompt_editor):
284
 
285
  @app.cell
286
  def _(inf_model, params, process_with_llm, prompt_editor):
287
- _ = prompt_editor.value['editor']
288
 
289
- if prompt_editor.value['editor']:
290
  prompt_response = process_with_llm(inf_model, prompt_template=prompt_editor.value['editor'], params=params, return_full_json_response=False)
291
  prompt_response_full = process_with_llm(inf_model, prompt_template=prompt_editor.value['editor'], params=params, return_full_json_response=True)
292
  else:
 
271
 
272
  @app.cell
273
  def _(mo, prompt_editor):
274
+ _ = prompt_editor.value
275
 
276
+ if prompt_editor.value['editor'] is not None:
277
  prompt_printout = mo.md(f"**Current prompt template:**\n\n {prompt_editor.value['editor']}")
278
  else:
279
  prompt_printout = mo.md(f"**Submit a prompt template.**")
 
284
 
285
  @app.cell
286
  def _(inf_model, params, process_with_llm, prompt_editor):
287
+ _ = prompt_editor.value
288
 
289
+ if prompt_editor.value['editor'] is not None:
290
  prompt_response = process_with_llm(inf_model, prompt_template=prompt_editor.value['editor'], params=params, return_full_json_response=False)
291
  prompt_response_full = process_with_llm(inf_model, prompt_template=prompt_editor.value['editor'], params=params, return_full_json_response=True)
292
  else: