merve HF staff commited on
Commit
ca9e330
1 Parent(s): ff299b4

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -4
app.py CHANGED
@@ -27,19 +27,19 @@ text_category_example = [[" anadolu_efes e 18 lik star ! beko_basketbol_ligi nde
27
 
28
 
29
  @spaces.GPU
30
- def nli(input, model_choice="turna_nli_nli_tr", generation_params):
31
 
32
  if model_choice=="turna_nli_nli_tr":
33
- nli_model = pipeline(model="boun-tabi-LMG/turna_nli_nli_tr", device=0, **generation_params)
34
  return nli_model(input)[0]["generated_text"]
35
  else:
36
- stsb_model = pipeline(model="boun-tabi-LMG/turna_semantic_similarity_stsb_tr", device=0, **generation_params)
37
 
38
  return stsb_model(input)[0]["generated_text"]
39
 
40
 
41
  @spaces.GPU
42
- def sentiment_analysis(input, model_choice="turna_classification_17bintweet_sentiment", generation_params):
43
  if model_choice=="turna_classification_17bintweet_sentiment":
44
  sentiment_model = pipeline(model="boun-tabi-LMG/turna_classification_17bintweet_sentiment", device=0)
45
 
 
27
 
28
 
29
  @spaces.GPU
30
+ def nli(input, model_choice="turna_nli_nli_tr"):
31
 
32
  if model_choice=="turna_nli_nli_tr":
33
+ nli_model = pipeline(model="boun-tabi-LMG/turna_nli_nli_tr", device=0)
34
  return nli_model(input)[0]["generated_text"]
35
  else:
36
+ stsb_model = pipeline(model="boun-tabi-LMG/turna_semantic_similarity_stsb_tr", device=0)
37
 
38
  return stsb_model(input)[0]["generated_text"]
39
 
40
 
41
  @spaces.GPU
42
+ def sentiment_analysis(input, model_choice="turna_classification_17bintweet_sentiment"):
43
  if model_choice=="turna_classification_17bintweet_sentiment":
44
  sentiment_model = pipeline(model="boun-tabi-LMG/turna_classification_17bintweet_sentiment", device=0)
45