bstraehle commited on
Commit
aa69ed9
·
1 Parent(s): d29a97d

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +9 -9
app.py CHANGED
@@ -48,15 +48,15 @@ def invoke(prompt):
48
  # top_k = config["top_k"],
49
  # top_p = config["top_p"],
50
  # ).text
51
- #completion = generation_model.generate_content(prompt, generation_config = {
52
- # "max_output_tokens": config["max_output_tokens"],
53
- # "temperature": config["temperature"],
54
- # "top_k": config["top_k"],
55
- # "top_p": config["top_p"],
56
- # }).text
57
- #wandb_log(prompt, completion)
58
- #return completion
59
- return "🛑 Execution is commented out. To view the source code see https://huggingface.co/spaces/bstraehle/google-vertex-ai-llm/tree/main."
60
 
61
  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
62
  with gemini-pro foundation model. RAG evaluation via <a href='https://wandb.ai/bstraehle'>Weights & Biases</a>."""
 
48
  # top_k = config["top_k"],
49
  # top_p = config["top_p"],
50
  # ).text
51
+ completion = generation_model.generate_content(prompt, generation_config = {
52
+ "max_output_tokens": config["max_output_tokens"],
53
+ "temperature": config["temperature"],
54
+ "top_k": config["top_k"],
55
+ "top_p": config["top_p"],
56
+ }).text
57
+ wandb_log(prompt, completion)
58
+ return completion
59
+ #return "🛑 Execution is commented out. To view the source code see https://huggingface.co/spaces/bstraehle/google-vertex-ai-llm/tree/main."
60
 
61
  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
62
  with gemini-pro foundation model. RAG evaluation via <a href='https://wandb.ai/bstraehle'>Weights & Biases</a>."""