Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -109,28 +109,34 @@ with gr.Blocks(theme=seafoam) as demo:
|
|
| 109 |
gr.Markdown("## MulitModal Phi2 Model Pretraining and Finetuning from Scratch")
|
| 110 |
|
| 111 |
with gr.Row():
|
| 112 |
-
|
| 113 |
-
|
| 114 |
-
|
| 115 |
-
|
| 116 |
-
|
| 117 |
-
|
| 118 |
-
|
| 119 |
-
|
| 120 |
-
|
| 121 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 122 |
|
| 123 |
-
image = gr.Image(type="filepath", value=None, label = "Upload Image")
|
| 124 |
-
audio_upload = gr.Audio(source="upload", type="filepath", label="Upload audio")
|
| 125 |
-
# file_output = gr.File()
|
| 126 |
-
# upload_button = gr.UploadButton("Click to Upload a File", file_types=["image", "audio"], file_count="multiple")
|
| 127 |
-
# image = upload_button.upload(upload_file, upload_button, file_output)
|
| 128 |
-
|
| 129 |
-
# audio_upload = image
|
| 130 |
-
|
| 131 |
-
audio_mic = gr.Audio(
|
| 132 |
-
source="microphone", type="filepath", format="mp3"
|
| 133 |
-
)
|
| 134 |
with gr.Row():
|
| 135 |
# Adding a Button
|
| 136 |
submit = gr.Button(value = "Submit", variant="primary")
|
|
|
|
| 109 |
gr.Markdown("## MulitModal Phi2 Model Pretraining and Finetuning from Scratch")
|
| 110 |
|
| 111 |
with gr.Row():
|
| 112 |
+
with gr.Column(scale=4):
|
| 113 |
+
# Creating a column with a scale of 6
|
| 114 |
+
with gr.Box():
|
| 115 |
+
with gr.Row():
|
| 116 |
+
# Adding image
|
| 117 |
+
image = gr.Image(type="filepath", value=None)
|
| 118 |
+
# Creating a column with a scale of 2
|
| 119 |
+
with gr.Row():
|
| 120 |
+
# Add audio
|
| 121 |
+
audio_upload = gr.Audio(source="upload", type="filepath")
|
| 122 |
+
audio_mic = gr.Audio(
|
| 123 |
+
source="microphone", type="filepath", format="mp3"
|
| 124 |
+
)
|
| 125 |
+
|
| 126 |
+
with gr.Column(scale=8):
|
| 127 |
+
with gr.Box():
|
| 128 |
+
with gr.Row():
|
| 129 |
+
chatbot = gr.Chatbot(
|
| 130 |
+
avatar_images=("🧑", "🤖"),
|
| 131 |
+
height=350,
|
| 132 |
+
)
|
| 133 |
+
|
| 134 |
+
with gr.Row():
|
| 135 |
+
# Adding a Textbox with a placeholder "write prompt"
|
| 136 |
+
prompt = gr.Textbox(
|
| 137 |
+
placeholder="Enter text, or upload an image or audio", lines=2, label="Query", value=None, scale = 4
|
| 138 |
+
)
|
| 139 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 140 |
with gr.Row():
|
| 141 |
# Adding a Button
|
| 142 |
submit = gr.Button(value = "Submit", variant="primary")
|