Xhaheen commited on
Commit
0601231
1 Parent(s): cc00493

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -9
app.py CHANGED
@@ -110,6 +110,7 @@ import openai
110
  from transformers import VisionEncoderDecoderModel, ViTImageProcessor, AutoTokenizer
111
  import torch
112
  from PIL import Image
 
113
 
114
  # Step 3: Load the provided image captioning model
115
  model = VisionEncoderDecoderModel.from_pretrained("nlpconnect/vit-gpt2-image-captioning")
@@ -155,7 +156,7 @@ image_input = gr.inputs.Image()
155
  department_input = gr.inputs.Dropdown(choices=["data science", "product management","marketing","startup" ,"agile","crypto" , "SEO" ])
156
  output_text = gr.outputs.Textbox()
157
 
158
- gr.Interface(fn=meme_generator, inputs=[image_input, department_input], outputs=output_text, title="Meme world!",description= " Looking for a fun and easy way to generate memes? Look no further than Meme world! Leveraging large language models like GPT-3PT-3 / Ai21 / Cohere, you can create memes that are sure to be a hit with your friends or network. Created with ♥️ by Arsalan @[Xaheen](https://www.linkedin.com/in/sallu-mandya/). kindly share your thoughts in discussion session and use the app responsibly #NO_Offense \n \n built with ❤️ @[Xhaheen](https://www.linkedin.com/in/sallu-mandya/)", theme="grass",
159
 
160
  examples =[['example5.png','data science' ],
161
  ['example2.png','product management'],
@@ -166,11 +167,3 @@ gr.Interface(fn=meme_generator, inputs=[image_input, department_input], outputs=
166
 
167
 
168
 
169
-
170
-
171
-
172
-
173
-
174
-
175
-
176
-
110
  from transformers import VisionEncoderDecoderModel, ViTImageProcessor, AutoTokenizer
111
  import torch
112
  from PIL import Image
113
+ import os
114
 
115
  # Step 3: Load the provided image captioning model
116
  model = VisionEncoderDecoderModel.from_pretrained("nlpconnect/vit-gpt2-image-captioning")
156
  department_input = gr.inputs.Dropdown(choices=["data science", "product management","marketing","startup" ,"agile","crypto" , "SEO" ])
157
  output_text = gr.outputs.Textbox()
158
 
159
+ gr.Interface(fn=meme_generator, inputs=[image_input, department_input], outputs=output_text, title="Meme world!",description= " Looking for a fun and easy way to generate memes? Look no further than Meme world! Leveraging large language models like GPT-3PT-3 / Ai21 / Cohere, you can create memes that are sure to be a hit with your friends or network. Created with ♥️ by Arsalan @[Xaheen](https://www.linkedin.com/in/sallu-mandya/). kindly share your thoughts in discussion session and use the app responsibly #NO_Offense \n \n built with ❤️ @[Xhaheen](https://www.linkedin.com/in/sallu-mandya/)", theme="freddyaboulton/dracula_revamped",
160
 
161
  examples =[['example5.png','data science' ],
162
  ['example2.png','product management'],
167
 
168
 
169