Spaces:
Runtime error
Runtime error
Upload 2 files
Browse files- app.py +9 -0
- requirements.txt +3 -0
app.py
ADDED
@@ -0,0 +1,9 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
from transformers import pipeline
|
2 |
+
import gradio as gr
|
3 |
+
|
4 |
+
pipe = pipeline("text-generation", model="bigscience/bloom")
|
5 |
+
|
6 |
+
input_file = gr.inputs.File(label="Upload PDF file")
|
7 |
+
#iface = gr.Interface(fn=predict, inputs=[input_file, input_subject, input_class], outputs=output_text)
|
8 |
+
demo = gr.Interface.from_pipeline(pipe)
|
9 |
+
demo.launch()
|
requirements.txt
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
gradio==3.39.00
|
2 |
+
langchain==0.0.247
|
3 |
+
transformers==4.31.0
|