whitelotus0 commited on
Commit
7e756d5
·
1 Parent(s): 2e31046

refine readme

Browse files
Files changed (1) hide show
  1. README.md +20 -0
README.md CHANGED
@@ -9,4 +9,24 @@ license: mit
9
  short_description: App for text generation
10
  ---
11
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
12
  Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference
 
9
  short_description: App for text generation
10
  ---
11
 
12
+ # Text Generation App
13
+
14
+ This Space demonstrates a basic text generation application built using FastAPI and the `transformers` library. It uses the `google/flan-t5-small` model, a powerful text-to-text generation model. You can try it out by sending a GET request to the `/generate` endpoint.
15
+
16
+ ## How to Use
17
+
18
+ To use this app, send a GET request to the `/generate` endpoint with a query parameter named `text`. For example:
19
+
20
+ ```
21
+ /generate?text=Summarize the following text: Artificial intelligence is an interdisciplinary field that deals with the creation of intelligent agents, which are systems that can reason, learn, and act autonomously.
22
+ ```
23
+
24
+ The response will be a JSON object with a key named `output`, which will contain the generated text.
25
+
26
+ ## Model
27
+
28
+ This Space utilizes the `google/flan-t5-small` model, which can be found [here](https://huggingface.co/google/flan-t5-small). It is a fine-tuned version of the T5 model and is capable of generating text from various inputs.
29
+
30
+ ## Configuration Reference
31
+
32
  Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference