Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
|
@@ -40,8 +40,6 @@ def respond(message, history):
|
|
| 40 |
ds_dict = {"dataframe_split": prompt.to_dict(orient="split")}
|
| 41 |
data_json = json.dumps(ds_dict, allow_nan=True)
|
| 42 |
|
| 43 |
-
embed_image_markdown = ""
|
| 44 |
-
|
| 45 |
try:
|
| 46 |
# γ’γγ«γ΅γΌγγ³γ°γ¨γ³γγγ€γ³γγ«εγεγγ
|
| 47 |
response = requests.request(method="POST", headers=headers, url=local_endpoint, data=data_json)
|
|
@@ -52,7 +50,7 @@ def respond(message, history):
|
|
| 52 |
response_data = f"ERROR status_code: {type(error).__name__}"
|
| 53 |
#+ str(response.status_code) + " response:" + response.text
|
| 54 |
|
| 55 |
-
return response_data["predictions"]
|
| 56 |
|
| 57 |
|
| 58 |
theme = gr.themes.Soft(
|
|
|
|
| 40 |
ds_dict = {"dataframe_split": prompt.to_dict(orient="split")}
|
| 41 |
data_json = json.dumps(ds_dict, allow_nan=True)
|
| 42 |
|
|
|
|
|
|
|
| 43 |
try:
|
| 44 |
# γ’γγ«γ΅γΌγγ³γ°γ¨γ³γγγ€γ³γγ«εγεγγ
|
| 45 |
response = requests.request(method="POST", headers=headers, url=local_endpoint, data=data_json)
|
|
|
|
| 50 |
response_data = f"ERROR status_code: {type(error).__name__}"
|
| 51 |
#+ str(response.status_code) + " response:" + response.text
|
| 52 |
|
| 53 |
+
return response_data["predictions"][0]
|
| 54 |
|
| 55 |
|
| 56 |
theme = gr.themes.Soft(
|