Your task is to review pull requests. Instructions:
- Provide the response in following JSON format: {"reviews": [{"line": <line_number>, "body": "<review comment>"}]}
- Do not give positive comments or compliments.
- Provide comments and suggestions ONLY if there is something to improve, otherwise "reviews" should be an empty array.
- Write the comment in GitHub Markdown format.
- Use the given description only for the overall context and only comment the code.
- IMPORTANT: NEVER suggest adding comments to the code.

Review the following code diff in the file "g4f/Provider/hf_space/Janus_Pro_7B.py" and take the pull request title and description into account when writing the response.
  
Pull request title: [pull] main from xtekky:main
Pull request description:
---
See [Commits](/bruvv/gpt4free/pull/168/commits) and [Changes](/bruvv/gpt4free/pull/168/files) for more details.

-----
Created by [<img src="https://prod.download/pull-18h-svg" valign="bottom"/> **pull[bot]**](https://github.com/wei/pull) (v2.0.0-alpha.1)

_Can you help keep this open source service alive? **[💖 Please sponsor : )](https://prod.download/pull-pr-sponsor)**_
---

Each line is prefixed by its number. Code to review:
```
8: 
9: from ...typing import AsyncResult, Messages, Cookies
10: from ..base_provider import AsyncGeneratorProvider, ProviderModelMixin
-from ..helper import format_prompt
-from ...providers.response import JsonConversation, ImageResponse
11:+from ..helper import format_prompt, format_image_prompt
12:+from ...providers.response import JsonConversation, ImageResponse, Notification
13: from ...requests.aiohttp import StreamSession, StreamResponse
14: from ...requests.raise_for_status import raise_for_status
15: from ...cookies import get_cookies
38:                     "headers": {
39:                         "content-type": "application/json",
40:                         "x-zerogpu-token": conversation.zerogpu_token,
-                        "x-zerogpu-uuid": conversation.uuid,
41:+                        "x-zerogpu-uuid": conversation.zerogpu_uuid,
42:                         "referer": cls.referer,
43:                     },
44:                     "json": {"data":[None,prompt,42,0.95,0.1],"event_data":None,"fn_index":2,"trigger_id":10,"session_hash":conversation.session_hash},
48:                     "headers": {
49:                         "content-type": "application/json",
50:                         "x-zerogpu-token": conversation.zerogpu_token,
-                        "x-zerogpu-uuid": conversation.uuid,
51:+                        "x-zerogpu-uuid": conversation.zerogpu_uuid,
52:                         "referer": cls.referer,
53:                     },
54:                     "json": {"data":[prompt,1234,5,1],"event_data":None,"fn_index":3,"trigger_id":20,"session_hash":conversation.session_hash},
82:             method = "image"
83: 
84:         prompt = format_prompt(messages) if prompt is None and conversation is None else prompt
-        prompt = messages[-1]["content"] if prompt is None else prompt
85:+        prompt = format_image_prompt(messages, prompt)
86: 
87:         session_hash = generate_session_hash() if conversation is None else getattr(conversation, "session_hash")
88:         async with StreamSession(proxy=proxy, impersonate="chrome") as session:
89:             session_hash = generate_session_hash() if conversation is None else getattr(conversation, "session_hash")
-            user_uuid = None if conversation is None else getattr(conversation, "user_uuid", None)
-            zerogpu_token = "[object Object]"
-
-            cookies = get_cookies("huggingface.co", raise_requirements_error=False) if cookies is None else cookies
-            if cookies:
-                # Get current UTC time + 10 minutes
-                dt = (datetime.now(timezone.utc) + timedelta(minutes=10)).isoformat(timespec='milliseconds')
-                encoded_dt = urllib.parse.quote(dt)
-                async with session.get(f"https://huggingface.co/api/spaces/deepseek-ai/Janus-Pro-7B/jwt?expiration={encoded_dt}&include_pro_status=true", cookies=cookies) as response:
-                    zerogpu_token = (await response.json())
-                    zerogpu_token = zerogpu_token["token"]
-            if user_uuid is None:
-                async with session.get(cls.url, cookies=cookies) as response:
-                    match = re.search(r"&quot;token&quot;:&quot;([^&]+?)&quot;", await response.text())
-                    if match:
-                        zerogpu_token = match.group(1)
-                    match = re.search(r"&quot;sessionUuid&quot;:&quot;([^&]+?)&quot;", await response.text())
-                    if match:
-                        user_uuid = match.group(1)
-
90:+            zerogpu_uuid, zerogpu_token = await get_zerogpu_token(session, conversation, cookies)
91:             if conversation is None or not hasattr(conversation, "session_hash"):
-                conversation = JsonConversation(session_hash=session_hash, zerogpu_token=zerogpu_token, uuid=user_uuid)
92:+                conversation = JsonConversation(session_hash=session_hash, zerogpu_token=zerogpu_token, zerogpu_uuid=zerogpu_uuid)
93:             conversation.zerogpu_token = zerogpu_token
94:             if return_conversation:
95:                 yield conversation
105:                         try:
106:                             json_data = json.loads(decoded_line[6:])
107:                             if json_data.get('msg') == 'log':
-                                debug.log(json_data["log"])
108:+                                yield Notification(json_data["log"])
109: 
110:                             if json_data.get('msg') == 'process_generating':
111:                                 if 'output' in json_data and 'data' in json_data['output']:
122:                                 break
123: 
124:                         except json.JSONDecodeError:
-                            debug.log("Could not parse JSON:", decoded_line)
```