bstraehle commited on
Commit
0a17b5c
·
1 Parent(s): 22f9400

Update app.py

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