odavis1 commited on
Commit
7562228
·
verified ·
1 Parent(s): d2c20b3

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -4
app.py CHANGED
@@ -1,13 +1,10 @@
1
  import gradio as gr
2
  from huggingface_hub import InferenceClient
3
 
4
- themes=["Pick a Genre", "thriller", "fantasy", "romance", "sci-fi", "mystery", "fiction", "Spanish"]
5
 
6
  def reaction(text, theme):
7
  modelName= 'HuggingFaceH4/zephyr-7b-beta'
8
- match theme:
9
- case "Spanish":
10
- modelName='DeepESP/gpt2-spanish'
11
  thiscontent=f'Give only one {theme} response to this statement: {text}?'
12
  messages=[{'role': 'user', 'content': thiscontent}]
13
  client=InferenceClient(model=modelName)
 
1
  import gradio as gr
2
  from huggingface_hub import InferenceClient
3
 
4
+ themes=["Pick a Genre", "thriller", "fantasy", "romance", "sci-fi", "mystery", "fiction"]
5
 
6
  def reaction(text, theme):
7
  modelName= 'HuggingFaceH4/zephyr-7b-beta'
 
 
 
8
  thiscontent=f'Give only one {theme} response to this statement: {text}?'
9
  messages=[{'role': 'user', 'content': thiscontent}]
10
  client=InferenceClient(model=modelName)