beeguy commited on
Commit
a498ca8
1 Parent(s): dd2e55e
Files changed (3) hide show
  1. .gitignore +7 -0
  2. app.py +12 -0
  3. requirements.txt +4 -0
.gitignore ADDED
@@ -0,0 +1,7 @@
 
 
 
 
 
 
 
 
1
+ # .gitignore file for python projects
2
+ .venv
3
+ .env
4
+ __pycache__
5
+ *.pyc
6
+ *.pyo
7
+ *.pyd
app.py ADDED
@@ -0,0 +1,12 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import torch
2
+ from transformers import pipeline
3
+ import gradio as gr
4
+
5
+ pipe = pipeline("text-generation", model="MTSAIR/multi_verse_model")
6
+
7
+ def greet(name):
8
+ pipe(name, do_sample=True, temperature=0.7, top_k=50, top_p=0.95)
9
+ return "Hello " + name + "!!"
10
+
11
+ iface = gr.Interface(fn=greet, inputs="text", outputs="text")
12
+ iface.launch()
requirements.txt ADDED
@@ -0,0 +1,4 @@
 
 
 
 
 
1
+ torch
2
+ transformers
3
+ accelerate
4
+ tensorflow_probability