bstraehle commited on
Commit
f9bc4fc
1 Parent(s): 49f3022

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -14,7 +14,7 @@ bedrock_runtime = boto3.client(
14
  region_name="us-west-2"
15
  )
16
 
17
- def complete(prompt):
18
  args = {
19
  "modelId": "anthropic.claude-v2",
20
  "contentType": "application/json",
@@ -26,7 +26,7 @@ def complete(prompt):
26
  return response_body['completion']
27
 
28
  gr.close_all()
29
- demo = gr.Interface(fn=complete,
30
  inputs=[gr.Textbox(label="Prompt", lines=1)],
31
  outputs=[gr.Textbox(label="Completion", lines=1)],
32
  title="Generative AI - Text Generation",
 
14
  region_name="us-west-2"
15
  )
16
 
17
+ def invoke(prompt):
18
  args = {
19
  "modelId": "anthropic.claude-v2",
20
  "contentType": "application/json",
 
26
  return response_body['completion']
27
 
28
  gr.close_all()
29
+ demo = gr.Interface(fn=invoke,
30
  inputs=[gr.Textbox(label="Prompt", lines=1)],
31
  outputs=[gr.Textbox(label="Completion", lines=1)],
32
  title="Generative AI - Text Generation",