Spaces:
Running
Running
app18
Browse files
app.py
CHANGED
@@ -31,7 +31,7 @@ from pydantic import BaseModel
|
|
31 |
import shutil
|
32 |
|
33 |
# Cell 1: Image Classification Model
|
34 |
-
image_pipeline = pipeline(task="image-classification", model="
|
35 |
|
36 |
def predict_image(input_img):
|
37 |
predictions = image_pipeline(input_img)
|
@@ -121,12 +121,9 @@ def chat_interface(question):
|
|
121 |
else:
|
122 |
return "Unexpected answer format"
|
123 |
|
124 |
-
chatbot_gradio_app = gr.
|
125 |
-
fn=chat_interface,
|
126 |
-
|
127 |
-
gr.inputs.Textbox(lines=1, label="Question"),
|
128 |
-
],
|
129 |
-
outputs="text"
|
130 |
)
|
131 |
|
132 |
# Combine both interfaces into a single app
|
|
|
31 |
import shutil
|
32 |
|
33 |
# Cell 1: Image Classification Model
|
34 |
+
image_pipeline = pipeline(task="image-classification", model="microsoft/resnet-50")
|
35 |
|
36 |
def predict_image(input_img):
|
37 |
predictions = image_pipeline(input_img)
|
|
|
121 |
else:
|
122 |
return "Unexpected answer format"
|
123 |
|
124 |
+
chatbot_gradio_app = gr.ChatInterface(
|
125 |
+
fn=chat_interface,
|
126 |
+
title='Our doubts are traitors, And make us lose the good we oft might win, By fearing to attempt.'
|
|
|
|
|
|
|
127 |
)
|
128 |
|
129 |
# Combine both interfaces into a single app
|