dfinel commited on
Commit
65bf073
1 Parent(s): b4fa733

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -3
app.py CHANGED
@@ -13,11 +13,11 @@ from langchain.llms import OpenAI
13
  import gradio as gr
14
 
15
 
16
- os.environ["OPENAI_API_KEY"] = "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"
17
 
18
  app = Flask(__name__)
19
 
20
- nlp = spacy.load('../topic_magnet/spacy_model')
21
  sentiment_pipeline = pipeline("sentiment-analysis", model='my_sentiment_model')
22
  classifier = pipeline(task="zero-shot-classification", model="my_zero_shot")
23
 
@@ -259,7 +259,7 @@ def get_reviews(url):
259
  if __name__ == '__main__':
260
  interface = gr.Interface(fn=get_reviews, inputs=gr.Textbox(), outputs=[gr.Textbox(label = 'Real ratings'),gr.Textbox(label = 'Actionable insights')], title='The Topic Magnet',
261
  description='Enter the url of your Amazon reviews to get real ratings and valuable insights')
262
- interface.launch(share = True)
263
  #app.run(host = '0.0.0.0', debug = True, port = 5000)
264
 
265
 
 
13
  import gradio as gr
14
 
15
 
16
+ os.environ["OPENAI_API_KEY"] = "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"
17
 
18
  app = Flask(__name__)
19
 
20
+ nlp = spacy.load('spacy_model')
21
  sentiment_pipeline = pipeline("sentiment-analysis", model='my_sentiment_model')
22
  classifier = pipeline(task="zero-shot-classification", model="my_zero_shot")
23
 
 
259
  if __name__ == '__main__':
260
  interface = gr.Interface(fn=get_reviews, inputs=gr.Textbox(), outputs=[gr.Textbox(label = 'Real ratings'),gr.Textbox(label = 'Actionable insights')], title='The Topic Magnet',
261
  description='Enter the url of your Amazon reviews to get real ratings and valuable insights')
262
+ interface.launch()
263
  #app.run(host = '0.0.0.0', debug = True, port = 5000)
264
 
265