Chris4K commited on
Commit
03b4c35
·
verified ·
1 Parent(s): 7685fcf

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +6 -3
app.py CHANGED
@@ -10,6 +10,10 @@ def generate_files(title="Text Generation Tool", emoji="🌖", colorFrom="blue",
10
  tags=["tool"], tool_name="text_generator", tool_description="This is a tool that chats with a user. "
11
  "It takes an input named `prompt` which contains a system_role, user_message, context and history. "
12
  "It returns a text message."):
 
 
 
 
13
  # Generate readme content
14
  readme_content = '''## readme
15
  title: {}
@@ -19,11 +23,10 @@ def generate_files(title="Text Generation Tool", emoji="🌖", colorFrom="blue",
19
  sdk: {}
20
  sdk_version: {}
21
  app_file: {}
22
- pinned: false
23
  tags:
24
  - {}
25
- '''.format(title, emoji, colorFrom, colorTo, sdk, sdk_version, app_file, tags[0])
26
-
27
 
28
  # Generate tool config JSON content
29
  tool_config = {
 
10
  tags=["tool"], tool_name="text_generator", tool_description="This is a tool that chats with a user. "
11
  "It takes an input named `prompt` which contains a system_role, user_message, context and history. "
12
  "It returns a text message."):
13
+ # Convert tags to a list if it's not already
14
+ if not isinstance(tags, list):
15
+ tags = [tags]
16
+
17
  # Generate readme content
18
  readme_content = '''## readme
19
  title: {}
 
23
  sdk: {}
24
  sdk_version: {}
25
  app_file: {}
26
+ pinned: {}
27
  tags:
28
  - {}
29
+ '''.format(title, emoji, colorFrom, colorTo, sdk, sdk_version, app_file, str(pinned), tags[0])
 
30
 
31
  # Generate tool config JSON content
32
  tool_config = {