nielsr HF staff commited on
Commit
09e8220
1 Parent(s): 7283bfa

Rename ImageGPT

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -2,7 +2,7 @@ import os
2
  os.system('pip install git+https://github.com/huggingface/transformers --upgrade')
3
 
4
  import gradio as gr
5
- from transformers import ImageGPTFeatureExtractor, ImageGPTForCausalLM
6
  import torch
7
  import numpy as np
8
  import requests
@@ -10,7 +10,7 @@ from PIL import Image
10
  import matplotlib.pyplot as plt
11
 
12
  feature_extractor = ImageGPTFeatureExtractor.from_pretrained("openai/imagegpt-medium")
13
- model = ImageGPTForCausalLM.from_pretrained("openai/imagegpt-medium")
14
  device = torch.device("cuda" if torch.cuda.is_available() else "cpu")
15
  model.to(device)
16
 
 
2
  os.system('pip install git+https://github.com/huggingface/transformers --upgrade')
3
 
4
  import gradio as gr
5
+ from transformers import ImageGPTFeatureExtractor, ImageGPTForCausalImageModeling
6
  import torch
7
  import numpy as np
8
  import requests
 
10
  import matplotlib.pyplot as plt
11
 
12
  feature_extractor = ImageGPTFeatureExtractor.from_pretrained("openai/imagegpt-medium")
13
+ model = ImageGPTForCausalImageModeling.from_pretrained("openai/imagegpt-medium")
14
  device = torch.device("cuda" if torch.cuda.is_available() else "cpu")
15
  model.to(device)
16