Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -1,40 +1,5 @@
|
|
| 1 |
import gradio as gr
|
| 2 |
|
| 3 |
-
|
| 4 |
-
#col-container {
|
| 5 |
-
margin: auto;
|
| 6 |
-
max-width: 800px;
|
| 7 |
-
}
|
| 8 |
-
"""
|
| 9 |
|
| 10 |
-
|
| 11 |
-
for x in message["files"]:
|
| 12 |
-
history.append([(x,), None])
|
| 13 |
-
if message["text"] is not None:
|
| 14 |
-
history.append([message["text"], None])
|
| 15 |
-
response = "**That's cool!**"
|
| 16 |
-
history[-1][1] = ""
|
| 17 |
-
for character in response:
|
| 18 |
-
history[-1][1] += character
|
| 19 |
-
yield history
|
| 20 |
-
|
| 21 |
-
|
| 22 |
-
with gr.Blocks(css=css, fill_height=True) as demo:
|
| 23 |
-
with gr.Column(elem_id="col-container"):
|
| 24 |
-
chatbot = gr.Chatbot(
|
| 25 |
-
[],
|
| 26 |
-
elem_id="chatbot",
|
| 27 |
-
bubble_full_width=False,
|
| 28 |
-
height=700,
|
| 29 |
-
)
|
| 30 |
-
|
| 31 |
-
chat_input = gr.MultimodalTextbox(interactive=True, file_types=["file"], placeholder="Enter message or upload file...", show_label=False)
|
| 32 |
-
|
| 33 |
-
chat_input.submit(bot_response, [chatbot, chat_input], [chatbot,])
|
| 34 |
-
|
| 35 |
-
demo.queue()
|
| 36 |
-
|
| 37 |
-
if __name__ == "__main__":
|
| 38 |
-
demo.launch()
|
| 39 |
-
|
| 40 |
-
|
|
|
|
| 1 |
import gradio as gr
|
| 2 |
|
| 3 |
+
demo = gr.Interface(lambda x: x, "image", "image")
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 4 |
|
| 5 |
+
demo.launch(max_file_size="1mb",)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|