bstraehle commited on
Commit
e3184f5
·
1 Parent(s): 9ed0055

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +5 -7
app.py CHANGED
@@ -41,15 +41,13 @@ generation_model = GenerativeModel(config.model)
41
 
42
  def invoke(prompt):
43
  #completion = generation_model.predict(prompt = prompt).text
44
- completion = generation_model.generate_content(prompt).text
45
- #print(generation_model.generate_content(prompt))
46
- #print(generation_model.generate_content(prompt).text)
47
- wandb.log({"prompt": prompt, "completion": completion})
48
- return completion
49
- return "Execution is commented out, but you can view the code at https://huggingface.co/spaces/bstraehle/google-vertex-ai-llm/tree/main."
50
 
51
  description = """<a href='https://www.gradio.app/'>Gradio</a> UI using <a href='https://cloud.google.com/vertex-ai?hl=en/'>Google Vertex AI</a> API
52
- with <s>text-bison@001</s> gemini-pro foundation model. Model performance evaluation via <a href='https://wandb.ai/bstraehle'>Weights & Biases</a>."""
53
 
54
  gr.close_all()
55
  demo = gr.Interface(fn=invoke,
 
41
 
42
  def invoke(prompt):
43
  #completion = generation_model.predict(prompt = prompt).text
44
+ #completion = generation_model.generate_content(prompt).text
45
+ #wandb.log({"prompt": prompt, "completion": completion})
46
+ #return completion
47
+ return "Execution is commented out, to view the source code see https://huggingface.co/spaces/bstraehle/google-vertex-ai-llm/tree/main."
 
 
48
 
49
  description = """<a href='https://www.gradio.app/'>Gradio</a> UI using <a href='https://cloud.google.com/vertex-ai?hl=en/'>Google Vertex AI</a> API
50
+ with gemini-pro foundation model. Model performance evaluation via <a href='https://wandb.ai/bstraehle'>Weights & Biases</a>."""
51
 
52
  gr.close_all()
53
  demo = gr.Interface(fn=invoke,