ryanrwatkins commited on
Commit
9546f1b
1 Parent(s): 063cf31

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +6 -6
app.py CHANGED
@@ -44,7 +44,7 @@ def get_empty_state():
44
 
45
  #Initial prompt template, others added below from TXT file
46
  prompt_templates = {"All Needs Experts": "Respond as if you are combiation of all needs assessment experts."}
47
- #actor_description = {}
48
 
49
  def download_prompt_templates():
50
  url = "https://huggingface.co/spaces/ryanrwatkins/needs/raw/main/gurus.txt"
@@ -56,9 +56,9 @@ def download_prompt_templates():
56
  if len(row) >= 2:
57
  act = row[0].strip('"')
58
  prompt = row[1].strip('"')
59
- #description = row[2].strip('"')
60
  prompt_templates[act] = prompt
61
- #actor_description[act] = description
62
 
63
 
64
 
@@ -74,9 +74,9 @@ def on_prompt_template_change(prompt_template):
74
  if not isinstance(prompt_template, str): return
75
  return prompt_templates[prompt_template]#, actor_description[prompt_template]
76
 
77
- #def on_prompt_template_change_description(prompt_template):
78
- # if not isinstance(prompt_template, str): return
79
- # return actor_description[prompt_template]
80
 
81
 
82
 
 
44
 
45
  #Initial prompt template, others added below from TXT file
46
  prompt_templates = {"All Needs Experts": "Respond as if you are combiation of all needs assessment experts."}
47
+ actor_description = {}
48
 
49
  def download_prompt_templates():
50
  url = "https://huggingface.co/spaces/ryanrwatkins/needs/raw/main/gurus.txt"
 
56
  if len(row) >= 2:
57
  act = row[0].strip('"')
58
  prompt = row[1].strip('"')
59
+ description = row[2].strip('"')
60
  prompt_templates[act] = prompt
61
+ actor_description[act] = description
62
 
63
 
64
 
 
74
  if not isinstance(prompt_template, str): return
75
  return prompt_templates[prompt_template]#, actor_description[prompt_template]
76
 
77
+ def on_prompt_template_change_description(prompt_template):
78
+ if not isinstance(prompt_template, str): return
79
+ return actor_description[prompt_template]
80
 
81
 
82