Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -63,35 +63,35 @@ def run(history, text, image, audio_upload, audio_mic):
|
|
| 63 |
with gr.Blocks() as demo:
|
| 64 |
gr.Markdown("## MulitModal Phi2 Model Pretraining and Finetuning from Scratch")
|
| 65 |
|
| 66 |
-
|
| 67 |
-
|
| 68 |
-
|
| 69 |
-
|
| 70 |
-
|
| 71 |
-
|
| 72 |
-
|
| 73 |
-
|
| 74 |
-
|
| 75 |
-
|
| 76 |
-
|
| 77 |
-
|
| 78 |
-
|
| 79 |
-
|
| 80 |
-
|
| 81 |
-
|
| 82 |
-
|
| 83 |
-
|
| 84 |
-
|
| 85 |
-
|
| 86 |
-
|
| 87 |
-
|
| 88 |
-
|
| 89 |
-
|
| 90 |
-
|
| 91 |
-
|
| 92 |
-
|
| 93 |
-
|
| 94 |
-
|
| 95 |
|
| 96 |
submit.click(
|
| 97 |
add_content,
|
|
|
|
| 63 |
with gr.Blocks() as demo:
|
| 64 |
gr.Markdown("## MulitModal Phi2 Model Pretraining and Finetuning from Scratch")
|
| 65 |
|
| 66 |
+
# with gr.Column(scale=8):
|
| 67 |
+
# with gr.Box():
|
| 68 |
+
with gr.Row():
|
| 69 |
+
chatbot = gr.Chatbot(
|
| 70 |
+
avatar_images=("π§", "π€"),
|
| 71 |
+
height=550,
|
| 72 |
+
)
|
| 73 |
+
|
| 74 |
+
# with gr.Box():
|
| 75 |
+
with gr.Row():
|
| 76 |
+
# Adding a Textbox with a placeholder "write prompt"
|
| 77 |
+
prompt = gr.Textbox(
|
| 78 |
+
placeholder="Enter text, or upload an image or audio", lines=2, label="Query", value=None
|
| 79 |
+
)
|
| 80 |
+
# Creating a column with a scale of 2
|
| 81 |
+
# with gr.Row():
|
| 82 |
+
# Adding image
|
| 83 |
+
image= gr.UploadButton("π", file_types=["image", "audio"])
|
| 84 |
+
audio_upload= image
|
| 85 |
+
# Creating a column with a scale of 2
|
| 86 |
+
# with gr.Row():
|
| 87 |
+
# Add audio
|
| 88 |
+
audio_mic = gr.Audio(
|
| 89 |
+
source="microphone", type="filepath", format="mp3"
|
| 90 |
+
)
|
| 91 |
+
with gr.Row():
|
| 92 |
+
# Adding a Button
|
| 93 |
+
submit = gr.Button()
|
| 94 |
+
clear = gr.Button(value="Clear")
|
| 95 |
|
| 96 |
submit.click(
|
| 97 |
add_content,
|