Nrnaidu commited on
Commit
1a3483f
·
verified ·
1 Parent(s): f029b7e

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +15 -0
app.py CHANGED
@@ -1,3 +1,18 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
  # Load text generation model and tokenizer
2
  device = "cuda" if torch.cuda.is_available() else "cpu"
3
  text_generation_model = AutoModelForCausalLM.from_pretrained("gpt2").to(device) # Move model to the correct device
 
1
+ import os
2
+ import io
3
+ import requests
4
+ import gradio as gr
5
+ from groq import Groq
6
+ from transformers import MarianMTModel, MarianTokenizer, AutoModelForCausalLM, AutoTokenizer
7
+ from deep_translator import GoogleTranslator
8
+ from PIL import Image, ImageDraw
9
+ import joblib
10
+ import time
11
+ import torch
12
+ import warnings
13
+ from huggingface_hub import InferenceApi
14
+ from diffusers import StableDiffusionPipeline
15
+
16
  # Load text generation model and tokenizer
17
  device = "cuda" if torch.cuda.is_available() else "cpu"
18
  text_generation_model = AutoModelForCausalLM.from_pretrained("gpt2").to(device) # Move model to the correct device