Update app.py
Browse files
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 |
-
#
|
46 |
-
#
|
47 |
-
|
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
|
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,
|