paloma99 commited on
Commit
2471c01
·
verified ·
1 Parent(s): ad2b402

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -3
app.py CHANGED
@@ -1,7 +1,7 @@
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,7 +15,7 @@ image_gradio_app = gr.Interface(
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,7 +34,7 @@ def predict_chatbot(input, history=[]):
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
 
1
  import gradio as gr
2
  from transformers import pipeline, AutoModelForCausalLM, AutoTokenizer
3
  import torch
4
+ import Theme() as 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=theme
19
  )
20
 
21
  # Cell 2: Chatbot Model
 
34
  chatbot_gradio_app = gr.ChatInterface(
35
  fn=predict_chatbot,
36
  title="Greta",
37
+ theme=theme
38
  )
39
 
40
  # Combine both interfaces into a single app