Spaces:
Runtime error
Runtime error
Kate Forsberg commited on
Commit ·
3f7cadd
1
Parent(s): ddbf5e3
new
Browse files
app.py
CHANGED
|
@@ -19,6 +19,13 @@ import os
|
|
| 19 |
#Load environment variables
|
| 20 |
load_dotenv()
|
| 21 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 22 |
|
| 23 |
#Create an agent that will create a prompt that can be used as input for the query agent from the Griptape Cloud.
|
| 24 |
|
|
@@ -128,7 +135,7 @@ def build_agent(session_id:str,message:str) -> Agent:
|
|
| 128 |
name="QueryResumeSearcher",
|
| 129 |
description="Use it to search for a candidate with the query.",
|
| 130 |
driver = GriptapeCloudStructureRunDriver(
|
| 131 |
-
base_url=os.environ.get("BASE_URL","https://cloud.griptape.ai"),
|
| 132 |
structure_id=os.getenv("GT_STRUCTURE_ID"),
|
| 133 |
api_key=os.getenv("GT_CLOUD_API_KEY"),
|
| 134 |
structure_run_wait_time_interval=5,
|
|
@@ -164,7 +171,7 @@ def send_message(message:str, history, request:gr.Request) -> Any:
|
|
| 164 |
return response.output.value
|
| 165 |
|
| 166 |
demo = gr.ChatInterface(
|
| 167 |
-
fn=send_message,
|
| 168 |
)
|
| 169 |
demo.launch()
|
| 170 |
|
|
|
|
| 19 |
#Load environment variables
|
| 20 |
load_dotenv()
|
| 21 |
|
| 22 |
+
#Create Custom styling
|
| 23 |
+
custom_css = """
|
| 24 |
+
#component-2 {
|
| 25 |
+
height: 90vh !important;
|
| 26 |
+
min-height: 90vh !important;
|
| 27 |
+
}
|
| 28 |
+
"""
|
| 29 |
|
| 30 |
#Create an agent that will create a prompt that can be used as input for the query agent from the Griptape Cloud.
|
| 31 |
|
|
|
|
| 135 |
name="QueryResumeSearcher",
|
| 136 |
description="Use it to search for a candidate with the query.",
|
| 137 |
driver = GriptapeCloudStructureRunDriver(
|
| 138 |
+
#base_url=os.environ.get("BASE_URL","https://cloud.griptape.ai"),
|
| 139 |
structure_id=os.getenv("GT_STRUCTURE_ID"),
|
| 140 |
api_key=os.getenv("GT_CLOUD_API_KEY"),
|
| 141 |
structure_run_wait_time_interval=5,
|
|
|
|
| 171 |
return response.output.value
|
| 172 |
|
| 173 |
demo = gr.ChatInterface(
|
| 174 |
+
fn=send_message, custom_css=custom_css
|
| 175 |
)
|
| 176 |
demo.launch()
|
| 177 |
|