Ctaake commited on
Commit
076fe2e
·
verified ·
1 Parent(s): 813a8a3

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +9 -3
app.py CHANGED
@@ -12,7 +12,7 @@ def format_prompt(raw_Prompt):
12
  return better_prompt
13
 
14
 
15
- def findShops(target_platform, target_region, target_field, target_rangeFrom, target_rangeTo, target_crossSelling, target_similarArticles, target_amount):
16
  requestPrompt = f"""
17
  Search for {target_amount} Shops that use the platform {target_platform}.
18
  Make sure the recommended shops are located in {target_region}.
@@ -24,7 +24,6 @@ def findShops(target_platform, target_region, target_field, target_rangeFrom, ta
24
  fieldPrompt = f"""
25
  Focus on shops that have a focus on the topic'{target_field}'."""
26
  stylePrompt = """
27
- Only recommend shops that have more than 1000 products on their website.
28
  Leave an empty line between your recommendations.
29
  Present your results in a list with the names of the shops as the headings.
30
  Make sure to include a link to the corresponding websites."""
@@ -114,12 +113,19 @@ with gr.Blocks(title="Shop finder",
114
  out = gr.Textbox(lines=10,
115
  max_lines=100,
116
  label='POTENTIAL SHOPS')
 
 
 
 
 
 
117
  btn.click(fn=findShops,
118
  inputs=[platform, region, field,
119
  range_from, range_to,
120
  opt_crossSelling,
121
  opt_similarArticles,
122
- numberOfShops],
 
123
  outputs=out)
124
 
125
  demo.launch(show_api=False)
 
12
  return better_prompt
13
 
14
 
15
+ def findShops(target_platform, target_region, target_field, target_rangeFrom, target_rangeTo, target_crossSelling, target_similarArticles, target_amount,compareSecret):
16
  requestPrompt = f"""
17
  Search for {target_amount} Shops that use the platform {target_platform}.
18
  Make sure the recommended shops are located in {target_region}.
 
24
  fieldPrompt = f"""
25
  Focus on shops that have a focus on the topic'{target_field}'."""
26
  stylePrompt = """
 
27
  Leave an empty line between your recommendations.
28
  Present your results in a list with the names of the shops as the headings.
29
  Make sure to include a link to the corresponding websites."""
 
113
  out = gr.Textbox(lines=10,
114
  max_lines=100,
115
  label='POTENTIAL SHOPS')
116
+ with gr.Group():
117
+ gr.Markdown("*ACCESS SECRET*")
118
+ loginSecret = gr.Textbox(max_lines=1,
119
+ interactive=True,
120
+ type='password',
121
+ show_label=False)
122
  btn.click(fn=findShops,
123
  inputs=[platform, region, field,
124
  range_from, range_to,
125
  opt_crossSelling,
126
  opt_similarArticles,
127
+ numberOfShops,
128
+ loginSecret],
129
  outputs=out)
130
 
131
  demo.launch(show_api=False)