bstraehle commited on
Commit
af7cd6b
β€’
1 Parent(s): 58dc143

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +6 -6
app.py CHANGED
@@ -40,12 +40,12 @@ def invoke(prompt):
40
  modelId = config["model"]
41
  accept = "application/json"
42
  contentType = "application/json"
43
- #response = bedrock_runtime.invoke_model(body = body, modelId = modelId, accept = accept, contentType = contentType)
44
- #response_body = json.loads(response.get("body").read())
45
- #completion = response_body["completion"]
46
- #wandb_log(prompt, completion)
47
- #return completion
48
- return "πŸ›‘ Execution is commented out. To view the source code see https://huggingface.co/spaces/bstraehle/amazon-bedrock-llm/tree/main."
49
 
50
  description = """<a href='https://www.gradio.app/'>Gradio</a> UI using <a href='https://aws.amazon.com/bedrock/'>Amazon Bedrock</a> API
51
  with <a href='https://www.anthropic.com/'>Anthropic</a> Claude 2 foundation model.
 
40
  modelId = config["model"]
41
  accept = "application/json"
42
  contentType = "application/json"
43
+ response = bedrock_runtime.invoke_model(body = body, modelId = modelId, accept = accept, contentType = contentType)
44
+ response_body = json.loads(response.get("body").read())
45
+ completion = response_body["completion"]
46
+ wandb_log(prompt, completion)
47
+ return completion
48
+ #return "πŸ›‘ Execution is commented out. To view the source code see https://huggingface.co/spaces/bstraehle/amazon-bedrock-llm/tree/main."
49
 
50
  description = """<a href='https://www.gradio.app/'>Gradio</a> UI using <a href='https://aws.amazon.com/bedrock/'>Amazon Bedrock</a> API
51
  with <a href='https://www.anthropic.com/'>Anthropic</a> Claude 2 foundation model.