ndurner commited on
Commit
245db11
β€’
1 Parent(s): 2f98b46

gradio 4.44

Browse files
Files changed (2) hide show
  1. README.md +1 -1
  2. llm.py +5 -5
README.md CHANGED
@@ -4,7 +4,7 @@ emoji: πŸ“ˆ
4
  colorFrom: yellow
5
  colorTo: gray
6
  sdk: gradio
7
- sdk_version: 4.41.0
8
  app_file: app.py
9
  pinned: false
10
  license: mit
 
4
  colorFrom: yellow
5
  colorTo: gray
6
  sdk: gradio
7
+ sdk_version: 4.44.0
8
  app_file: app.py
9
  pinned: false
10
  license: mit
llm.py CHANGED
@@ -54,11 +54,11 @@ class LLM:
54
  lastTypeHuman = False
55
 
56
  user_msg_parts = []
57
- if message.text:
58
- user_msg_parts.append({"text": message.text})
59
- if message.files:
60
- for file in message.files:
61
- user_msg_parts.extend(self._process_file(file.path))
62
 
63
  if user_msg_parts:
64
  messages.append({"role": "user", "content": user_msg_parts})
 
54
  lastTypeHuman = False
55
 
56
  user_msg_parts = []
57
+ if message["text"]:
58
+ user_msg_parts.append({"text": message["text"]})
59
+ if message["files"]:
60
+ for file in message["files"]:
61
+ user_msg_parts.extend(self._process_file(file["path"]))
62
 
63
  if user_msg_parts:
64
  messages.append({"role": "user", "content": user_msg_parts})