Update app.py
Browse files
app.py
CHANGED
@@ -4,7 +4,7 @@ import json, os, vertexai, wandb
|
|
4 |
from dotenv import load_dotenv, find_dotenv
|
5 |
_ = load_dotenv(find_dotenv())
|
6 |
|
7 |
-
|
8 |
project = os.environ["PROJECT"]
|
9 |
wandb_api_key = os.environ["WANDB_API_KEY"]
|
10 |
|
@@ -38,7 +38,7 @@ def invoke(prompt):
|
|
38 |
|
39 |
gr.close_all()
|
40 |
demo = gr.Interface(fn=invoke,
|
41 |
-
inputs = [gr.Textbox(label = "Prompt", lines = 1)
|
42 |
outputs = [gr.Textbox(label = "Completion", lines = 1)],
|
43 |
title = "Generative AI - Language",
|
44 |
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 with Bison foundation model")
|
|
|
4 |
from dotenv import load_dotenv, find_dotenv
|
5 |
_ = load_dotenv(find_dotenv())
|
6 |
|
7 |
+
credentials = os.environ["CREDENTIALS"]
|
8 |
project = os.environ["PROJECT"]
|
9 |
wandb_api_key = os.environ["WANDB_API_KEY"]
|
10 |
|
|
|
38 |
|
39 |
gr.close_all()
|
40 |
demo = gr.Interface(fn=invoke,
|
41 |
+
inputs = [gr.Textbox(label = "Prompt", lines = 1)],
|
42 |
outputs = [gr.Textbox(label = "Completion", lines = 1)],
|
43 |
title = "Generative AI - Language",
|
44 |
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 with Bison foundation model")
|