Update app.py
Browse files
app.py
CHANGED
@@ -58,8 +58,10 @@ def invoke(prompt):
|
|
58 |
"top_p": config["top_p"],
|
59 |
}).text
|
60 |
except Exception as e:
|
|
|
61 |
raise gr.Error(e)
|
62 |
-
|
|
|
63 |
return completion
|
64 |
#return "🛑 Execution is commented out. To view the source code see https://huggingface.co/spaces/bstraehle/google-vertex-ai-llm/tree/main."
|
65 |
|
|
|
58 |
"top_p": config["top_p"],
|
59 |
}).text
|
60 |
except Exception as e:
|
61 |
+
completion = e
|
62 |
raise gr.Error(e)
|
63 |
+
finally:
|
64 |
+
wandb_log(prompt, completion)
|
65 |
return completion
|
66 |
#return "🛑 Execution is commented out. To view the source code see https://huggingface.co/spaces/bstraehle/google-vertex-ai-llm/tree/main."
|
67 |
|