taka-yayoi commited on
Commit
acc5a10
β€’
1 Parent(s): 70918e0

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -3
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(