Spaces:
Paused
Paused
Upload folder using huggingface_hub
Browse files- __pycache__/chat_interface.cpython-311.pyc +0 -0
- chat_interface.py +1 -12
- data.json +4 -1
- gradio_app.py +1 -1
__pycache__/chat_interface.cpython-311.pyc
CHANGED
Binary files a/__pycache__/chat_interface.cpython-311.pyc and b/__pycache__/chat_interface.cpython-311.pyc differ
|
|
chat_interface.py
CHANGED
@@ -111,7 +111,6 @@ class ChatInterface(Blocks):
|
|
111 |
fill_width: bool = False,
|
112 |
api_name: str | Literal[False] = "chat",
|
113 |
save_history: bool = False,
|
114 |
-
logo: str | None = None,
|
115 |
):
|
116 |
"""
|
117 |
Parameters:
|
@@ -196,7 +195,6 @@ class ChatInterface(Blocks):
|
|
196 |
self.autofocus = autofocus
|
197 |
self.title = title
|
198 |
self.description = description
|
199 |
-
self.logo = logo
|
200 |
self.show_progress = show_progress
|
201 |
if save_history and not type == "messages":
|
202 |
raise ValueError("save_history is only supported for type='messages'")
|
@@ -275,16 +273,6 @@ class ChatInterface(Blocks):
|
|
275 |
|
276 |
self._setup_events()
|
277 |
|
278 |
-
# def _render_header(self):
|
279 |
-
# if self.logo:
|
280 |
-
# Markdown(f"""\
|
281 |
-
# <p align="center"><img src="{self.logo}" style="height: 100px"/><p>""")
|
282 |
-
# if self.title:
|
283 |
-
# Markdown(f"""<center><font size=8>{self.title}</center>""")
|
284 |
-
# if self.description:
|
285 |
-
# Markdown(
|
286 |
-
# f"""\
|
287 |
-
# <center><font size=3>{self.description}</center>""")
|
288 |
def _render_header(self):
|
289 |
if self.title:
|
290 |
Markdown(
|
@@ -352,6 +340,7 @@ class ChatInterface(Blocks):
|
|
352 |
examples=self.examples_messages
|
353 |
if not self._additional_inputs_in_examples
|
354 |
else None,
|
|
|
355 |
)
|
356 |
with Group():
|
357 |
with Row():
|
|
|
111 |
fill_width: bool = False,
|
112 |
api_name: str | Literal[False] = "chat",
|
113 |
save_history: bool = False,
|
|
|
114 |
):
|
115 |
"""
|
116 |
Parameters:
|
|
|
195 |
self.autofocus = autofocus
|
196 |
self.title = title
|
197 |
self.description = description
|
|
|
198 |
self.show_progress = show_progress
|
199 |
if save_history and not type == "messages":
|
200 |
raise ValueError("save_history is only supported for type='messages'")
|
|
|
273 |
|
274 |
self._setup_events()
|
275 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
276 |
def _render_header(self):
|
277 |
if self.title:
|
278 |
Markdown(
|
|
|
340 |
examples=self.examples_messages
|
341 |
if not self._additional_inputs_in_examples
|
342 |
else None,
|
343 |
+
rtl=True,
|
344 |
)
|
345 |
with Group():
|
346 |
with Row():
|
data.json
CHANGED
@@ -1 +1,4 @@
|
|
1 |
-
|
|
|
|
|
|
|
|
1 |
+
Translate into arabic without translating the company name
|
2 |
+
```
|
3 |
+
The company named ADNOC is good.
|
4 |
+
```
|
gradio_app.py
CHANGED
@@ -78,7 +78,7 @@ def load_chat(
|
|
78 |
response += chunk.choices[0].delta.content
|
79 |
yield response
|
80 |
|
81 |
-
return
|
82 |
open_api_stream, type="messages", **kwargs,
|
83 |
)
|
84 |
|
|
|
78 |
response += chunk.choices[0].delta.content
|
79 |
yield response
|
80 |
|
81 |
+
return ChatInterface(
|
82 |
open_api_stream, type="messages", **kwargs,
|
83 |
)
|
84 |
|