Anupam251272
commited on
Commit
•
7aa5f4c
1
Parent(s):
80efa34
Update app.py
Browse files
app.py
CHANGED
@@ -16,7 +16,7 @@ logging.basicConfig(level=logging.INFO)
|
|
16 |
logger = logging.getLogger(__name__)
|
17 |
|
18 |
class MultilingualGitaAnalyzer:
|
19 |
-
def __init__(self, csv_path='
|
20 |
"""Initialize the Bhagavad Gita Analyzer with multilingual support."""
|
21 |
logger.info("Initializing Multilingual Bhagavad Gita Analyzer")
|
22 |
self.df = None
|
@@ -138,8 +138,7 @@ class MultilingualGitaAnalyzer:
|
|
138 |
def generate_image(self, text):
|
139 |
"""Generate an image using the DiffusionPipeline."""
|
140 |
try:
|
141 |
-
pipe = DiffusionPipeline.from_pretrained("
|
142 |
-
pipe.load_lora_weights("adirik/flux-cinestill")
|
143 |
prompt = f"in the style of CNSTLL, {text}, night time, cinestill 800T"
|
144 |
image = pipe(prompt).images[0]
|
145 |
img_path = 'generated_image.png'
|
@@ -251,7 +250,7 @@ class MultilingualGitaAnalyzer:
|
|
251 |
return iface
|
252 |
|
253 |
def main():
|
254 |
-
analyzer = MultilingualGitaAnalyzer('
|
255 |
interface = analyzer.gradio_interface()
|
256 |
interface.launch(share=True)
|
257 |
|
|
|
16 |
logger = logging.getLogger(__name__)
|
17 |
|
18 |
class MultilingualGitaAnalyzer:
|
19 |
+
def __init__(self, csv_path='Bhagwad_Gita.csv'):
|
20 |
"""Initialize the Bhagavad Gita Analyzer with multilingual support."""
|
21 |
logger.info("Initializing Multilingual Bhagavad Gita Analyzer")
|
22 |
self.df = None
|
|
|
138 |
def generate_image(self, text):
|
139 |
"""Generate an image using the DiffusionPipeline."""
|
140 |
try:
|
141 |
+
pipe = DiffusionPipeline.from_pretrained("CompVis/stable-diffusion-v1-4")
|
|
|
142 |
prompt = f"in the style of CNSTLL, {text}, night time, cinestill 800T"
|
143 |
image = pipe(prompt).images[0]
|
144 |
img_path = 'generated_image.png'
|
|
|
250 |
return iface
|
251 |
|
252 |
def main():
|
253 |
+
analyzer = MultilingualGitaAnalyzer('Bhagwad_Gita.csv')
|
254 |
interface = analyzer.gradio_interface()
|
255 |
interface.launch(share=True)
|
256 |
|