AlexWortega commited on
Commit
a2de83d
1 Parent(s): 2a5a6bc

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +5 -3
app.py CHANGED
@@ -1,10 +1,12 @@
1
  import torch
2
  import gradio as gr
3
  from transformers import AutoModelForCausalLM, AutoTokenizer
4
-
5
  device = 'cpu'
6
 
7
- def ans(question, description='', category=''):
 
 
8
  seed = random.randint(1, 10000000)
9
  print(f'Seed: {seed}')
10
  torch.manual_seed(seed)
@@ -37,7 +39,7 @@ examples = [
37
  ["Как какать?"]
38
  ]
39
 
40
- iface = gr.Interface(fn=greet, inputs="text", outputs="text")
41
 
42
  if __name__ == "__main__":
43
  iface.launch()
 
1
  import torch
2
  import gradio as gr
3
  from transformers import AutoModelForCausalLM, AutoTokenizer
4
+ import random
5
  device = 'cpu'
6
 
7
+ def ans(question ):
8
+ description=''
9
+ category=''
10
  seed = random.randint(1, 10000000)
11
  print(f'Seed: {seed}')
12
  torch.manual_seed(seed)
 
39
  ["Как какать?"]
40
  ]
41
 
42
+ iface = gr.Interface(fn=ans, inputs="text", outputs="text")
43
 
44
  if __name__ == "__main__":
45
  iface.launch()