paloma99 commited on
Commit
e524871
1 Parent(s): 45d2df4

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -0
app.py CHANGED
@@ -1,6 +1,7 @@
1
  import gradio as gr
2
  from transformers import pipeline, AutoModelForCausalLM, AutoTokenizer
3
  import torch
 
4
 
5
  # Cell 1: Image Classification Model
6
  image_pipeline = pipeline(task="image-classification", model="julien-c/hotdog-not-hotdog")
@@ -14,6 +15,7 @@ image_gradio_app = gr.Interface(
14
  inputs=gr.Image(label="Select hot dog candidate", sources=['upload', 'webcam'], type="pil"),
15
  outputs=[gr.Image(label="Processed Image"), gr.Label(label="Result", num_top_classes=2)],
16
  title="Hot Dog? Or Not?",
 
17
  )
18
 
19
  # Cell 2: Chatbot Model
@@ -32,6 +34,7 @@ def predict_chatbot(input, history=[]):
32
  chatbot_gradio_app = gr.ChatInterface(
33
  fn=predict_chatbot,
34
  title="Greta",
 
35
  )
36
 
37
  # Combine both interfaces into a single app
 
1
  import gradio as gr
2
  from transformers import pipeline, AutoModelForCausalLM, AutoTokenizer
3
  import torch
4
+ import greta_theme
5
 
6
  # Cell 1: Image Classification Model
7
  image_pipeline = pipeline(task="image-classification", model="julien-c/hotdog-not-hotdog")
 
15
  inputs=gr.Image(label="Select hot dog candidate", sources=['upload', 'webcam'], type="pil"),
16
  outputs=[gr.Image(label="Processed Image"), gr.Label(label="Result", num_top_classes=2)],
17
  title="Hot Dog? Or Not?",
18
+ theme=greta_theme
19
  )
20
 
21
  # Cell 2: Chatbot Model
 
34
  chatbot_gradio_app = gr.ChatInterface(
35
  fn=predict_chatbot,
36
  title="Greta",
37
+ theme=greta_theme
38
  )
39
 
40
  # Combine both interfaces into a single app